[gentoo-dev] [PATCH 1/2] kernel-build.eclass: add IUSE="strip", install generated keys

2023-06-15 Thread Andrew Ammerlaan
From 480e54c27d09ceeb1dab662fcb395c33f807402a Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Fri, 9 Jun 2023 10:36:18 +0200 Subject: [PATCH] kernel-build.eclass: add IUSE="strip", install generated keys - Let the kernel build system handle stripping of the modules. This is necessary

[gentoo-dev] [PATCH 2/2] kernel-build.eclass: add USE="modules-sign"

2023-06-15 Thread Andrew Ammerlaan
From fc8894ff62b45cc7a4148a9f6ba51f1afe7b920a Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Thu, 8 Jun 2023 20:44:58 +0200 Subject: [PATCH] sys-kernel/gentoo-kernel: add USE="modules-sign" - Enable module signing configure options if requested by the user. - Respect the

Re: [gentoo-dev] What happened to gcc-12.3.0?

2023-06-15 Thread Sam James
Joshua Kinard writes: > Noticing that the ebuild for gcc-12.3.0 got dropped with little > explanation. It is the upstream stable release. I am eyeballing > #906310 as what may have triggered the drop, but I find it a bit of a > stretch that an upstream stable release got dropped over a

Re: [gentoo-dev] [PATCH 1/2 v2] kernel-build.eclass: add IUSE="+strip modules-sign", install generated keys

2023-06-15 Thread Andrew Ammerlaan
Version 2 moves all of the logic into the eclass, reducing code duplication at the cost of potentially having to adjust the CONFIG_MODULE_SIG_* logic at some later stage if this changes upstream. We now also unset KBUILD_SIGN_PIN, as is done in linux-mod-r1.eclass as well. From

Re: [gentoo-dev] [PATCH 2/2] kernel-build.eclass: add USE="modules-sign"

2023-06-15 Thread Andrew Ammerlaan
On 15/06/2023 11:59, Florian Schmaus wrote: On 15.06.23 11:50, Andrew Ammerlaan wrote: +pkg_postinst() { +    kernel-build_pkg_postinst +    if use modules-sign; then +    if [[ -z "${MODULES_SIGN_KEY}" ]]; then +    ewarn "" You can drop the empty string argument and simply just

[gentoo-dev] [PATCH 0/2] kernel-build.eclass: fix signing and compressing of kernel modules

2023-06-15 Thread Andrew Ammerlaan
Hi all, This first patch reworks the stripping of kernel modules, mirroring the changes from linux-mod.eclass to linux-mod-r1.eclass, and fixing Bug 814344 and Bug 881651. Before this change enabling the CONFIG_MODULE_SIG=y and CONFIG_MODULE_SIG_ALL=y kernel options would cause the kernel

Re: [gentoo-dev] [PATCH 2/2] kernel-build.eclass: add USE="modules-sign"

2023-06-15 Thread Florian Schmaus
On 15.06.23 11:50, Andrew Ammerlaan wrote: From fc8894ff62b45cc7a4148a9f6ba51f1afe7b920a Mon Sep 17 00:00:00 2001 From: Andrew Ammerlaan Date: Thu, 8 Jun 2023 20:44:58 +0200 Subject: [PATCH] sys-kernel/gentoo-kernel: add USE="modules-sign" - Enable module signing configure options if

[gentoo-dev] [PATCH] python-utils-r1.eclass: Use @a instead of declare check for array

2023-06-15 Thread Michał Górny
Use bash 5's @a variable substitution instead of `declare -p` check to determine if `PYTHON_COMPAT` is an array. This avoids a subshell, and effectively makes the function roughly 3.5x faster: ``` * Timing _python_set_impls real 4854 it/s user 4862 it/s ``` In practice, this roughly reduces

[gentoo-dev] [PATCH] pypi.eclass: Do extglob reset unconditionally

2023-06-15 Thread Michał Górny
Change _pypi_normalize_name() to reset extglob unconditionally. This function is called only in two contexts: - inside a subshell, therefore making it unnecessary to restore the original extglob value, - in global scope, via _pypi_set_globals, where we know that extglob is not supposed to

[gentoo-dev] [PATCH 05/11] ruby-ng.eclass: optimize: avoid subshells for ruby_implementations_depend, ruby_get_use_targets

2023-06-15 Thread Sam James
We go from 2.5s -> 1.9s to source dev-ruby/*. Bug: https://bugs.gentoo.org/908465 Signed-off-by: Sam James --- eclass/ruby-ng.eclass | 36 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index

[gentoo-dev] [PATCH 04/11] ruby-ng.eclass: optimize: avoid subshells for _ruby_atoms_samelib*

2023-06-15 Thread Sam James
- Inline ruby_atoms_samelib (only used by one caller) - Avoid repeated (subshell) calls to _ruby_atoms_samelib_generic by using a result variable instead. We go from 3.5s -> 2.5s to source dev-ruby/*. Thanks to mgorny for the ideas here. Bug: https://bugs.gentoo.org/908465 Signed-off-by: Sam

[gentoo-dev] [PATCH 06/11] ruby-ng.eclass: use bash +=

2023-06-15 Thread Sam James
Easier to read. Signed-off-by: Sam James --- eclass/ruby-ng.eclass | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index 6c5666ddeabb0..b20c3b4629155 100644 --- a/eclass/ruby-ng.eclass +++

Re: [gentoo-dev] [PATCH 10/11] ruby-ng.eclass: use shopt directly, not via estack.eclass

2023-06-15 Thread Petr Vaněk
On Thu, Jun 15, 2023 at 04:52:37PM +0100, Sam James wrote: > ulm points out that estack.eclass is particularly inefficient (although > it'll get slightly better once https://github.com/gentoo/gentoo/pull/31437 > is fixed). > > Let's just manually roll it like llvm.eclass does. > > Bug:

Re: [gentoo-dev] [PATCH 1/2 v2] kernel-build.eclass: add IUSE="+strip modules-sign", install generated keys

2023-06-15 Thread Andrew Ammerlaan
On 15/06/2023 15:46, Mike Gilbert wrote: On Thu, Jun 15, 2023 at 9:06 AM Andrew Ammerlaan wrote: # @FUNCTION: kernel-build_merge_configs @@ -270,16 +354,39 @@ kernel-build_merge_configs() { local user_configs=( "${BROOT}"/etc/kernel/config.d/*.config ) shopt -u nullglob +

[gentoo-dev] [PATCH 09/11] ruby-ng.eclass: cater to USE_RUBY conditional calls

2023-06-15 Thread Sam James
Packages may try to restrict their test dependencies to ease bootstrapping/porting if they're not yet available for a newer Ruby implementation by setting USE_RUBY="" ruby_add_bdepend ... For example, dev-ruby/parallel does: ``` # Rails isn't yet ruby32-ready in Gentoo USE_RUBY="ruby27 ruby30

[gentoo-dev] [PATCH 10/11] ruby-ng.eclass: use shopt directly, not via estack.eclass

2023-06-15 Thread Sam James
ulm points out that estack.eclass is particularly inefficient (although it'll get slightly better once https://github.com/gentoo/gentoo/pull/31437 is fixed). Let's just manually roll it like llvm.eclass does. Bug: https://bugs.gentoo.org/908465 Signed-off-by: Sam James ---

[gentoo-dev] [PATCH 07/11] ruby-ng.eclass: use bash tests

2023-06-15 Thread Sam James
Signed-off-by: Sam James --- eclass/ruby-ng.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index b20c3b4629155..f10c987ac44a7 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -392,7 +392,7 @@ fi

[gentoo-dev] [PATCH 08/11] ruby-ng.eclass: drop no-op RDEPEND assignment

2023-06-15 Thread Sam James
Signed-off-by: Sam James --- eclass/ruby-ng.eclass | 1 - 1 file changed, 1 deletion(-) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index f10c987ac44a7..3269ed52cafe0 100644 --- a/eclass/ruby-ng.eclass +++ b/eclass/ruby-ng.eclass @@ -280,7 +280,6 @@ ruby_add_bdepend() {

Re: [gentoo-dev] What happened to gcc-12.3.0?

2023-06-15 Thread Joshua Kinard
On 6/15/2023 01:04, Matt Turner wrote: On Thu, Jun 15, 2023 at 12:02 AM Joshua Kinard wrote: Options? I mean, if anyone knows magic to make gcc build faster, I am all ears, but ever since the switch to C++, the time needed for it to build itself has just been absolutely horrendous. And it

[gentoo-dev] [PATCH 02/11] ruby-ng.eclass: optimize: use pattern substitution

2023-06-15 Thread Sam James
We can save a little bit (consistently a few ms) by using patsubs in some obvious cases. Not really any difference globally, but for sinatra: ``` $ pk pkg source $(pkg) --repo ~/g/ --bench 5s # before dev-ruby/sinatra-3.0.5::/home/sam/g/: mean: 76.25ms, min: 59.23ms, max: 83.674ms, σ = 4.247ms,

[gentoo-dev] [PATCH 01/11] ruby-ng.eclass: optimize: use pattern for old ruby impls

2023-06-15 Thread Sam James
Not much improvement on a grand scale, but for dev-ruby/sinatra at least, we get: ``` $ pk pkg source $(pkg) --repo ~/g/ --bench 5s # before dev-ruby/sinatra-3.0.5::/home/sam/g/: mean: 76.25ms, min: 59.23ms, max: 83.674ms, σ = 4.247ms, N = 66 dev-ruby/sinatra-3.0.5-r1::/home/sam/g/: mean:

[gentoo-dev] [PATCH 03/11] ruby-ng.eclass: optimize: avoid subshell for ruby_get_all_impls

2023-06-15 Thread Sam James
We go from ~4s -> ~3.5s for sourcing dev-ruby/*. For sinatra: ``` $ pk pkg source $(pkg) --repo ~/g/ --bench 5s # before dev-ruby/sinatra-2.2.3::/home/sam/g/: mean: 66.68ms, min: 56.938ms, max: 74.248ms, σ = 4.832ms, N = 75 dev-ruby/sinatra-3.0.6::/home/sam/g/: mean: 73.618ms, min: 60.153ms,

Re: [gentoo-dev] [PATCH 1/2 v2] kernel-build.eclass: add IUSE="+strip modules-sign", install generated keys

2023-06-15 Thread Mike Gilbert
On Thu, Jun 15, 2023 at 9:06 AM Andrew Ammerlaan wrote: > # @FUNCTION: kernel-build_merge_configs > @@ -270,16 +354,39 @@ kernel-build_merge_configs() { > local user_configs=( "${BROOT}"/etc/kernel/config.d/*.config ) > shopt -u nullglob > > + local merge_configs=( "${@}"

Re: [gentoo-dev] What happened to gcc-12.3.0?

2023-06-15 Thread Andreas K. Huettel
Am Donnerstag, 15. Juni 2023, 06:02:14 CEST schrieb Joshua Kinard: > > Noticing that the ebuild for gcc-12.3.0 got dropped with little explanation. > It is the upstream stable > release. I am eyeballing #906310 as what may have triggered the drop, but I > find it a bit of a stretch ... This

[gentoo-dev] [PATCH 11/11] ruby-ng.eclass: add _ruby_get_use_targets comment

2023-06-15 Thread Sam James
I don't see us adding a non-ruby* target any time soon so this should be fine. Signed-off-by: Sam James --- eclass/ruby-ng.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass index 8fe26057e7ffe..043e3eefcbd68 100644 ---

Re: [gentoo-dev] What happened to gcc-12.3.0?

2023-06-15 Thread Joshua Kinard
On 6/15/2023 07:37, Sam James wrote: Joshua Kinard writes: Noticing that the ebuild for gcc-12.3.0 got dropped with little explanation. It is the upstream stable release. I am eyeballing #906310 as what may have triggered the drop, but I find it a bit of a stretch that an upstream stable

Re: [gentoo-dev] [PATCH 10/11] ruby-ng.eclass: use shopt directly, not via estack.eclass

2023-06-15 Thread Sam James
Hans de Graaff writes: > On Thu, 1970-01-01 at 00:00 +, Sam James wrote: >> ulm points out that estack.eclass is particularly inefficient >> (although >> it'll get slightly better once >> https://github.com/gentoo/gentoo/pull/31437 >> is fixed). >> >> Let's just manually roll it like

Re: [gentoo-dev] [PATCH 10/11] ruby-ng.eclass: use shopt directly, not via estack.eclass

2023-06-15 Thread Sam James
Petr Vaněk writes: > On Thu, Jun 15, 2023 at 04:52:37PM +0100, Sam James wrote: >> ulm points out that estack.eclass is particularly inefficient (although >> it'll get slightly better once https://github.com/gentoo/gentoo/pull/31437 >> is fixed). >> >> Let's just manually roll it like

Re: [gentoo-dev] [PATCH 01/11] ruby-ng.eclass: optimize: use pattern for old ruby impls

2023-06-15 Thread Sam James
Hans de Graaff writes: > On Thu, 1970-01-01 at 00:00 +, Sam James wrote: >> Not much improvement on a grand scale, but for dev-ruby/sinatra at >> least, we get: > > Reviewed all patches and they look good to me. > > Thanks! And thank you! > > Hans best, sam signature.asc Description:

[gentoo-dev] [PATCH] cmake.eclass: Set CMAKE_SYSROOT when building with SYSROOT=

2023-06-15 Thread James Le Cuirot
From: Raul E Rangel When performing a SYSROOT= build, the --sysroot parameter was not getting passed to the compiler if the CBUILD and CHOST matched. This results in the build attempting to use BROOT libraries and headers instead of the ones from the SYSROOT. This change will allow `llvm` to be

[gentoo-dev] [PATCH] flag-o-matic.eclass: Don't inherit eutils in EAPI 7

2023-06-15 Thread Ulrich Müller
None of the ebuilds inheriting flag-o-matic in EAPI 7 needs any of the remaining eutils features. Signed-off-by: Ulrich Müller --- eclass/flag-o-matic.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index

[gentoo-dev] [PATCH 1/2] mercurial.eclass: Fix typo in eclassdoc

2023-06-15 Thread Ulrich Müller
Fixes: 216f39ea557e3950aa4d0c174f36df737afcb5fe Signed-off-by: Ulrich Müller --- eclass/mercurial.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass index 27fb525bcbd6..472d7448d513 100644 --- a/eclass/mercurial.eclass +++

[gentoo-dev] [PATCH 2/2] mercurial.eclass: Don't inherit eutils

2023-06-15 Thread Ulrich Müller
None of the ebuilds inheriting mercurial.eclass needs any of the remaining eutils features in EAPI 7. Signed-off-by: Ulrich Müller --- eclass/mercurial.eclass | 8 1 file changed, 8 deletions(-) diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass index

Re: [gentoo-dev] [PATCH 10/11] ruby-ng.eclass: use shopt directly, not via estack.eclass

2023-06-15 Thread Hans de Graaff
On Thu, 1970-01-01 at 00:00 +, Sam James wrote: > ulm points out that estack.eclass is particularly inefficient > (although > it'll get slightly better once > https://github.com/gentoo/gentoo/pull/31437 > is fixed). > > Let's just manually roll it like llvm.eclass does. It looks like that

Re: [gentoo-dev] [PATCH 01/11] ruby-ng.eclass: optimize: use pattern for old ruby impls

2023-06-15 Thread Hans de Graaff
On Thu, 1970-01-01 at 00:00 +, Sam James wrote: > Not much improvement on a grand scale, but for dev-ruby/sinatra at > least, we get: Reviewed all patches and they look good to me. Thanks! Hans