summaryrefslogtreecommitdiff
path: root/eclass
Commit message (Collapse)AuthorAgeFilesLines
* llvm.org.eclass: Add 17.0.0_pre20230630 snapshotMichał Górny2023-06-301-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/postgres.eclass, profiles/desc/postgres_targets.desc: Remove ↵Patrick Lauer2023-06-301-1/+1
| | | | | | postgres10, add postgres16 Signed-off-by: Patrick Lauer <patrick@gentoo.org>
* acct-user.eclass: include exit status in death messageMike Gilbert2023-06-262-4/+4
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: improve error message when usermod failsMike Gilbert2023-06-261-5/+23
| | | | | | | | | | | | | | | | | usermod refuses to update the home directory for a user with running processes. Output a more helpful message and avoid calling die for this. For other usermod failures, output stderr as an eerror message and die. Example output: * Failed to update user portage * This user currently has one or more running processes. * Please update this user manually with the following command: * usermod '--comment' 'System user; portage' '--home' '/var/lib/portage/home' '--shell' '/bin/bash' '--gid' 'portage' '--groups' '' portage Bug: https://bugs.gentoo.org/888189 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* cmake.eclass: Set CMAKE_SYSROOT when building with SYSROOT=Raul E Rangel2023-06-241-10/+10
| | | | | | | | | | | | | | | 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 built into a new SYSROOT. ROOT=/build/amd64-host emerge sys-devel/llvm Signed-off-by: Raul E Rangel <rrangel@chromium.org> Closes: https://github.com/gentoo/gentoo/pull/30658 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* toolchain.eclass: namespace hardened functionSam James2023-06-241-10/+10
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: wire up --enable-host-bind-now for GCC 14Sam James2023-06-241-0/+8
| | | | | | See also b26f3f99faabc3574cd3510bc1f57b90bdf585e9. Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: simplify TOOLCHAIN_SET_S logicSam James2023-06-231-7/+3
| | | | | | I've got no idea why I added that indirection before. Signed-off-by: Sam James <sam@gentoo.org>
* plasma.kde.org.eclass: Better restrict unstable version defAndreas Sturmlechner2023-06-211-1/+1
| | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* dist-kernel-utils.eclass: skip initrd installation when using ukiAndrew Ammerlaan2023-06-201-4/+14
| | | | | | | | | | Gets rid of a hack that prevents 50-dracut.install from regenerating the initrd when calling kernel-install. Instead instruct kernel-install to simply not run this plugin. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31358 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* dist-kernel-utils.eclass: fix extension of generated efi fileAndrew Ammerlaan2023-06-201-2/+2
| | | | | | | If kernel-install is configured to use the uki layout the extension of the efi file that we install has to be .efi otherwise kernel-install returns an error. Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* kernel-build.eclass: add IUSE="modules-sign"Andrew Ammerlaan2023-06-201-1/+89
| | | | | | | | | | | | | | | | - Enable module signing configure options if requested by the user. - Define the user variables MODULES_SIGN_HASH and MODULES_SIGN_KEY. For controlling the used hashing algorithm and allowing the use of external keys. These variables are the same as in linux-mod-r1.eclass - Warn the user if we are letting the kernel build system generate the signing key. This key will end up binary packages. Plus external modules will have to be resigned if gentoo-kernel is re-emerged (i.e. a new key was generated). Bug: https://bugs.gentoo.org/814344 Bug: https://bugs.gentoo.org/881651 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* kernel-build.eclass: add IUSE="strip", install generated keysAndrew Ammerlaan2023-06-201-3/+23
| | | | | | | | | | | | | - Let the kernel build system handle stripping of the modules. This is necessary for successfully signing and compressing modules. Inspired by linux-mod-r1.eclass. - If the build system has generated keys or certificates, install them. This is required to successfully sign external kernel modules. Closes: https://bugs.gentoo.org/814344 Closes: https://bugs.gentoo.org/881651 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
* gnustep-base.eclass: Don't inherit eutils in EAPI 7Ulrich Müller2023-06-201-3/+2
| | | | | | | None of the ebuilds inheriting gnustep-base or gnustep-2 in EAPI 7 needs any of the remaining eutils features. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* golang-vcs.eclass: Don't inherit eutilsUlrich Müller2023-06-201-1/+1
| | | | | | | | This was only needed for estack which is also inherited directly. None of the ebuilds inheriting golang-vcs needs any eutils feature. Closes: https://bugs.gentoo.org/908654 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* llvm.org.eclass: Add 17.0.0_pre20230620 snapshotMichał Górny2023-06-201-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* perl-module.eclass: Depend on perl-Test-Simple with a versionAndreas K. Hüttel2023-06-181-1/+1
| | | | | | This is in preparation of a QA check Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* cargo.eclass: Mark GIT_CRATES as pre-inheritMichał Górny2023-06-181-0/+1
| | | | | | | | | | | The variable needs to be set before inherit in order for ${CARGO_CRATE_URIS} to be set correctly. Currently all ebuilds using GIT_CRATES except for one define it pre-inherit anyway, and this makes it consistent with CRATES. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31456 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* cargo.eclass: Support separating crate names/versions via `@`Michał Górny2023-06-182-60/+75
| | | | | | | | | | | | | | | | | | Support specifying crate names and versions separated by `@` character rather than `-`. Since `@` are not valid in crate names, this makes splitting the tokens trivial and free of regular expressions. Effectively, the `@` variant is roughly 180% faster: ``` * CRATES with '@' separator real 952 it/s user 952 it/s * CRATES with '-' separator real 339 it/s user 339 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* cargo.eclass: Optimize GIT_CRATES checkMichał Górny2023-06-181-29/+29
| | | | | | | | | | | | | | Optimize the GIT_CRATES check to call `declare -p` only if the variable is actually set. In the vast majority of ebuilds using cargo.eclass, it's not set, so the subshell-first approach is slowing things down. With this change, the speed improves by another ~20%: ``` real 363 it/s user 365 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* cargo.eclass: Add variable alternative to $(cargo_crate_uris)Michał Górny2023-06-182-16/+36
| | | | | | | | | | | | | Add a helper function that sets ${CARGO_CRATE_URIS} variable to make it possible to set SRC_URI without subshells. This gives a slight speedup (~20%): ``` real 300 it/s user 324 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Add a minimal benchmark for cargo.eclassMichał Górny2023-06-181-0/+107
| | | | | | | | | | | The initial results on my machine are: ``` real 252 it/s user 289 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* linux-mod.eclass: Mark as deprecated in favor of linux-mod-r1.eclassMike Pagano2023-06-171-0/+1
| | | | Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* ecm.eclass: Add Qt 5.15.10 to ECM_QTHELP Portage bug workaroundAndreas Sturmlechner2023-06-171-6/+15
| | | | | Closes: https://bugs.gentoo.org/908715 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
* llvm.org.eclass: Add 17.0.0_pre20230615 snapshotMichał Górny2023-06-171-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain.eclass: fix USE=doc buildSam James2023-06-171-2/+2
| | | | | | | | Thanks to Dirk Sondermann for pointing out the precise issue. Closes: https://bugs.gentoo.org/908550 Fixes: a606b978be638005c9b832a733d087dbc97ae6d0 Signed-off-by: Sam James <sam@gentoo.org>
* pypi.eclass: Do extglob reset unconditionallyMichał Górny2023-06-171-8/+6
| | | | | | | | | | | | | | | | | 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 be set. This makes the code simpler. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31465 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Use @a instead of declare check for arrayMichał Górny2023-06-171-4/+11
| | | | | | | | | | | | | | | | | | | 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 total sourcing time for `dev-python/*` from 57-58 s to 54 s. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31454 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Add a benchmark for python-utils-r1Michał Górny2023-06-171-0/+53
| | | | | | | | | | | | Initial timings on my system: ``` * Timing _python_set_impls real 1463 it/s user 1886 it/s ``` Signed-off-by: Michał Górny <mgorny@gentoo.org>
* common-lisp-3.eclass: Don't call readarray -d unless >=bash-5.0Ulrich Müller2023-06-161-2/+10
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* common-lisp-3.eclass: Don't inherit eutilsUlrich Müller2023-06-161-2/+0
| | | | | | | Neither the eclass nor any of the ebuilds inheriting common-lisp-3 needs eutils features. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* rpm.eclass: Don't inherit eutils in EAPI 7Ulrich Müller2023-06-161-2/+1
| | | | | | | None of the ebuilds inheriting rpm in EAPI 7 needs any of the remaining eutils features. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* rpm.eclass: Drop support for EAPI 5Ulrich Müller2023-06-161-5/+5
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* mercurial.eclass: Don't inherit eutilsUlrich Müller2023-06-161-8/+0
| | | | | | | None of the ebuilds inheriting mercurial.eclass needs any of the remaining eutils features in EAPI 7. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* mercurial.eclass: Fix typo in eclassdocUlrich Müller2023-06-161-1/+1
| | | | | Fixes: 216f39ea557e3950aa4d0c174f36df737afcb5fe Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* flag-o-matic.eclass: Don't inherit eutils in EAPI 7Ulrich Müller2023-06-161-1/+1
| | | | | | | None of the ebuilds inheriting flag-o-matic in EAPI 7 needs any of the remaining eutils features. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* ruby-single.eclass: add missing 'local'Sam James2023-06-161-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* ruby-fakegem.eclass: adapt to ruby-ng.eclass changesSam James2023-06-161-2/+2
| | | | | | | | | | | | | | | | | | | ruby-fakegem uses an internal function (which is technically allowed, I guess, maybe, but all of this should really be shifted into ruby-utils ultimately - funnily enough negil pointed out that general class of problem yesterday. diff of bad/good:: ``` --- good/rake-13.0.6-r1/image/usr/bin/rake +++ bad/rake-13.0.6-r1-1/image/usr/bin/rake @@ -1,4 +1,4 @@ -#!/usr/bin/env ruby +#! ``` Closes: https://bugs.gentoo.org/908598 Fixes: 390ad2effe1c83a7cb25a892ad988937b53c07fe Signed-off-by: Sam James <sam@gentoo.org>
* toolchain.eclass: Don't inherit eutilsUlrich Müller2023-06-161-3/+0
| | | | | | | None of the ebuilds inheriting toolchain in EAPI 7 needs any of the remaining eutils features. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* estack.eclass: Fix bug in eshopts_push()Ulrich Müller2023-06-161-2/+2
| | | | | | | | "eshopts_push -s autocd; eshopts_pop" (i.e. the first option listed by "shopt -p") would not restore the option because of bogus whitespace in the saved string. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* toolchain.eclass: support --enable-host-pie for GCC 14Sam James2023-06-161-0/+4
| | | | | | See also https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f9de5c24b9a6172d48786289035eed8f947c04c1. Signed-off-by: Sam James <sam@gentoo.org>
* llvm.eclass: export LLVM_CONFIG if not cross-compilingSam James2023-06-151-0/+6
| | | | | | | | | | Set LLVM_CONFIG to help Meson (bug #907965) but only do it for empty ESYSROOT (as a proxy for "are we cross-compiling?"). Closes: https://bugs.gentoo.org/907965 Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31429 Signed-off-by: Sam James <sam@gentoo.org>
* ruby-ng.eclass: add _ruby_get_use_targets commentSam James2023-06-151-0/+3
| | | | | | | I don't see us adding a non-ruby* target any time soon so this should be fine. Closes: https://github.com/gentoo/gentoo/pull/31428 Signed-off-by: Sam James <sam@gentoo.org>
* ruby-ng.eclass: use shopt directly, not via estack.eclassSam James2023-06-151-3/+4
| | | | | | | | | | | 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 <sam@gentoo.org>
* ruby-ng.eclass: cater to USE_RUBY conditional callsSam James2023-06-151-4/+36
| | | | | | | | | | | | | | | | | | | 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="<some subset of original USE_RUBY>" ruby_add_bdepend ... For example, dev-ruby/parallel does: ``` # Rails isn't yet ruby32-ready in Gentoo USE_RUBY="ruby27 ruby30 ruby31" ruby_add_bdepend " test? ( dev-ruby/activerecord[sqlite] ) ``` This isn't ideal, but we don't have a ruby_gen_cond_dep right now, so cater to this usecase by invalidating the caches we've previously added if we've detected USE_RUBY changed. Signed-off-by: Sam James <sam@gentoo.org>
* ruby-ng.eclass: drop no-op RDEPEND assignmentSam James2023-06-151-1/+0
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* ruby-ng.eclass: use bash testsSam James2023-06-151-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* ruby-ng.eclass: use bash +=Sam James2023-06-151-9/+9
| | | | | | Easier to read. Signed-off-by: Sam James <sam@gentoo.org>
* ruby-ng.eclass: optimize: avoid subshells for ruby_implementations_depend, ↵Sam James2023-06-151-8/+28
| | | | | | | | | ruby_get_use_targets We go from 2.5s -> 1.9s to source dev-ruby/*. Bug: https://bugs.gentoo.org/908465 Signed-off-by: Sam James <sam@gentoo.org>
* ruby-ng.eclass: optimize: avoid subshells for _ruby_atoms_samelib*Sam James2023-06-151-28/+29
| | | | | | | | | | | | | - 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 James <sam@gentoo.org>