[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Michał Górny
commit: 0611129171a7f43be5e554c3ace3880c981aea92
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Jan 23 08:23:18 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Jan  8 14:48:15 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06111291

verify-sig.eclass: Accept 1-out-of-n sigs on multisig files

If a distfile has multiple detached signatures, pass verification
if at least one of them can be verified rather than requiring all
of them.  This is particularly helpful for upstreams where the whole
set of release keys is hard to come by.

Closes: https://bugs.gentoo.org/873211
Closes: https://github.com/gentoo/gentoo/pull/29224
Signed-off-by: Michał Górny  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/29592
Signed-off-by: Michał Górny  gentoo.org>

 eclass/verify-sig.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass
index 88fb17c31652..b74ed78290aa 100644
--- a/eclass/verify-sig.eclass
+++ b/eclass/verify-sig.eclass
@@ -160,7 +160,7 @@ verify-sig_verify_detached() {
# https://bugs.gentoo.org/854492
local -x TMPDIR=/tmp
gemato openpgp-verify-detached -K "${key}" \
-   "${extra_args[@]}" \
+   "${extra_args[@]}" --no-require-all-good \
"${sig}" "${file}" ||
die "PGP signature verification failed"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Michał Górny
commit: d466b3b94a8149cfb7ef4f7ac34d373b0ae4447f
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Jan  5 10:50:51 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Jan  8 14:48:14 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d466b3b9

verify-sig.eclass: Remove  gentoo.org>

 eclass/verify-sig.eclass | 18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass
index d5f71669538e..88fb17c31652 100644
--- a/eclass/verify-sig.eclass
+++ b/eclass/verify-sig.eclass
@@ -1,4 +1,4 @@
-# Copyright 2020-2023 Gentoo Authors
+# Copyright 2020-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: verify-sig.eclass
@@ -68,7 +68,7 @@ case ${VERIFY_SIG_METHOD} in
BDEPEND="
verify-sig? (
app-crypt/gnupg
-   >=app-portage/gemato-16
+   >=app-portage/gemato-20
)
"
;;
@@ -159,16 +159,10 @@ verify-sig_verify_detached() {
# gpg can't handle very long TMPDIR
# https://bugs.gentoo.org/854492
local -x TMPDIR=/tmp
-   if has_version ">=app-portage/gemato-20"; then
-   gemato openpgp-verify-detached -K "${key}" \
-   "${extra_args[@]}" \
-   "${sig}" "${file}" ||
-   die "PGP signature verification failed"
-   else
-   gemato gpg-wrap -K "${key}" "${extra_args[@]}" 
-- \
-   gpg --verify "${sig}" "${file}" ||
-   die "PGP signature verification failed"
-   fi
+   gemato openpgp-verify-detached -K "${key}" \
+   "${extra_args[@]}" \
+   "${sig}" "${file}" ||
+   die "PGP signature verification failed"
;;
signify)
signify -V -p "${key}" -m "${file}" -x "${sig}" ||



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: 736816f859cb89432b26e0505d89418baba99d30
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 12:29:09 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 12:29:09 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=736816f8

toolchain.eclass: fix lex, yacc versions

Fixes: b8300e99e7137925c73f1d067caed8af4f77dc1b
Fixes: 4c621abb2923e1085cc4aaf67c30901510d8b3c0
Signed-off-by: Sam James  gentoo.org>

 eclass/toolchain.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index f328d9503ca8..a446fd8f1a34 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -303,8 +303,8 @@ if tc_has_feature graphite ; then
 fi
 
 BDEPEND="
-   >=app-alternatives/yacc-1.875
-   >=app-alternatives/lex-2.5.4
+   app-alternatives/yacc
+   app-alternatives/lex
nls? ( sys-devel/gettext )
test? (
>=dev-util/dejagnu-1.4.4



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: bd3dc0379262bedb0bb301df1b9c82442835be3e
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 12:10:20 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 12:25:21 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd3dc037

kernel-2.eclass: sys-devel/bison -> app-alternatives/yacc

All of these will be using app-alternatives/yacc anyway as they're not unsetting
YACC or LEX, so make the dep reflect reality.

(Included both YACC and LEX out of conservatism.)

Signed-off-by: Sam James  gentoo.org>

 eclass/kernel-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 786b78958200..00b3566ab92d 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -656,7 +656,7 @@ if [[ ${ETYPE} == sources ]]; then
app-alternatives/cpio
dev-lang/perl
app-alternatives/bc
-   sys-devel/bison
+   app-alternatives/yacc
app-alternatives/lex
sys-devel/make
>=sys-libs/ncurses-5.2



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: b8300e99e7137925c73f1d067caed8af4f77dc1b
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 12:10:33 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 12:25:21 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8300e99

toolchain.eclass: sys-devel/bison -> app-alternatives/yacc

All of these will be using app-alternatives/yacc anyway as they're not unsetting
YACC or LEX, so make the dep reflect reality.

(Included both YACC and LEX out of conservatism.)

Signed-off-by: Sam James  gentoo.org>

 eclass/toolchain.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 6ac5f97b114a..f328d9503ca8 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -303,7 +303,7 @@ if tc_has_feature graphite ; then
 fi
 
 BDEPEND="
-   >=sys-devel/bison-1.875
+   >=app-alternatives/yacc-1.875
>=app-alternatives/lex-2.5.4
nls? ( sys-devel/gettext )
test? (



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: 4c621abb2923e1085cc4aaf67c30901510d8b3c0
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 11:53:38 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 12:03:17 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c621abb

toolchain.eclass: sys-devel/flex -> app-alternatives/lex

All of these will be using app-alternatives/lex anyway as they're not unsetting
YACC or LEX, so make the dep reflect reality.

(Included both YACC and LEX out of conservatism.)

Signed-off-by: Sam James  gentoo.org>

 eclass/toolchain.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 60769c93877f..6ac5f97b114a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: toolchain.eclass
@@ -304,7 +304,7 @@ fi
 
 BDEPEND="
>=sys-devel/bison-1.875
-   >=sys-devel/flex-2.5.4
+   >=app-alternatives/lex-2.5.4
nls? ( sys-devel/gettext )
test? (
>=dev-util/dejagnu-1.4.4



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: 486f12612d840bf4efbd324afdab59a98dd27fce
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 11:53:25 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 12:03:17 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=486f1261

kernel-build.eclass: sys-devel/flex -> app-alternatives/lex

All of these will be using app-alternatives/lex anyway as they're not unsetting
YACC or LEX, so make the dep reflect reality.

(Included both YACC and LEX out of conservatism.)

Signed-off-by: Sam James  gentoo.org>

 eclass/kernel-build.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index ce14aabe025d..841981a6ad45 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -39,7 +39,7 @@ BDEPEND="
${PYTHON_DEPS}
app-alternatives/cpio
app-alternatives/bc
-   sys-devel/flex
+   app-alternatives/lex
virtual/libelf
app-alternatives/yacc
arm? ( sys-apps/dtc )



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: 57a9b506597e766521a5633898d33fef125ecd5b
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 11:53:11 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 12:03:16 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57a9b506

kernel-2.eclass: sys-devel/flex -> app-alternatives/lex

All of these will be using app-alternatives/lex anyway as they're not unsetting
YACC or LEX, so make the dep reflect reality.
(Included both YACC and LEX out of conservatism.)

Signed-off-by: Sam James  gentoo.org>

 eclass/kernel-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 15d4eaea96f6..786b78958200 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -657,7 +657,7 @@ if [[ ${ETYPE} == sources ]]; then
dev-lang/perl
app-alternatives/bc
sys-devel/bison
-   sys-devel/flex
+   app-alternatives/lex
sys-devel/make
>=sys-libs/ncurses-5.2
virtual/libelf



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: 906ca2654eefd7f2e94bb3bc572566096b122881
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 09:41:35 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 09:42:17 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=906ca265

kernel-2.eclass: sys-devel/bc -> app-alternatives/bc

All of these will be using app-alternatives/bc anyway as they're not calling
bc-reference, so make the dep reflect reality.

Signed-off-by: Sam James  gentoo.org>

 eclass/kernel-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 5ecd97c173ff..76aa820aad09 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: kernel-2.eclass
@@ -655,7 +655,7 @@ if [[ ${ETYPE} == sources ]]; then
RDEPEND="!build? (
app-arch/cpio
dev-lang/perl
-   sys-devel/bc
+   app-alternatives/bc
sys-devel/bison
sys-devel/flex
sys-devel/make



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-08 Thread Sam James
commit: 213f1a49dc5791c63508b4de1223926a8713d3f3
Author: Sam James  gentoo  org>
AuthorDate: Mon Jan  8 09:41:45 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Jan  8 09:42:17 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=213f1a49

kernel-build.eclass: sys-devel/bc -> app-alternatives/bc

All of these will be using app-alternatives/bc anyway as they're not calling
bc-reference, so make the dep reflect reality.

Signed-off-by: Sam James  gentoo.org>

 eclass/kernel-build.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 391a99ceffce..36cb08811829 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -38,7 +38,7 @@ inherit multiprocessing python-any-r1 savedconfig 
toolchain-funcs kernel-install
 BDEPEND="
${PYTHON_DEPS}
app-arch/cpio
-   sys-devel/bc
+   app-alternatives/bc
sys-devel/flex
virtual/libelf
app-alternatives/yacc



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-07 Thread Andrew Ammerlaan
commit: 9a940c3f3c5411d170cd0f575ab87790326cf7c6
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Wed Jan  3 10:31:15 2024 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sun Jan  7 17:28:59 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a940c3f

kernel-build.eclass: allow overriding UKI cmdline

Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/kernel-build.eclass | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index f3a59559d104..391a99ceffce 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 2020-2023 Gentoo Authors
+# Copyright 2020-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: kernel-build.eclass
@@ -96,6 +96,14 @@ IUSE="+strip"
 # key in PEM format to use. Must be specified if MODULES_SIGN_KEY
 # is set to a path of a file that only contains the private key.
 
+# @ECLASS_VARIABLE: KERNEL_GENERIC_UKI_CMDLINE
+# @USER_VARIABLE
+# @DESCRIPTION:
+# If KERNEL_IUSE_GENERIC_UKI is set, this variable allows setting the
+# built-in kernel command line for the UKI. If unset, the default is
+# root=/dev/gpt-auto-root ro
+: "${KERNEL_GENERIC_UKI_CMDLINE:="root=/dev/gpt-auto-root ro"}"
+
 if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then
IUSE+=" modules-sign"
REQUIRED_USE="secureboot? ( modules-sign )"
@@ -432,7 +440,7 @@ kernel-build_src_install() {
local ukify_args=(
--linux="${image}"
--initrd="${image%/*}/initrd"
-   --cmdline="root=/dev/gpt-auto-root ro"
+   --cmdline="${KERNEL_GENERIC_UKI_CMDLINE}"
--uname="${dir_ver}"
--output="${image%/*}/uki.efi"
)



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-07 Thread Andrew Ammerlaan
commit: a42e98431e7538eadaee1df2b90f0e3174b22341
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Wed Nov 15 18:59:06 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sun Jan  7 17:28:56 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a42e9843

eclass/(dist-)kernel-*.eclass: drop installkernel-gentoo-7

because we drop the generation of the initrd/uki here
we can remove KERNEL_IUSE_SECUREBOOT since this is now
exactly the same as KERNEL_IUSE_MODULES_SIGN

Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/dist-kernel-utils.eclass | 78 -
 eclass/kernel-build.eclass  | 13 +++
 eclass/kernel-install.eclass| 39 +++--
 3 files changed, 17 insertions(+), 113 deletions(-)

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 8ccffd038474..13137f8c863c 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -12,13 +12,6 @@
 # This eclass provides various utility functions related to Distribution
 # Kernels.
 
-# @ECLASS_VARIABLE: KERNEL_IUSE_SECUREBOOT
-# @PRE_INHERIT
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# If set to a non-null value, inherits secureboot.eclass
-# and allows signing of generated kernel images.
-
 # @ECLASS_VARIABLE: KERNEL_EFI_ZBOOT
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -35,43 +28,6 @@ esac
 
 inherit toolchain-funcs
 
-if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
-   inherit secureboot
-fi
-
-# @FUNCTION: dist-kernel_build_initramfs
-# @USAGE:  
-# @DESCRIPTION:
-# Build an initramfs for the kernel.   specifies the absolute
-# path where initramfs will be created, while  specifies
-# the kernel version, used to find modules.
-#
-# Note: while this function uses dracut at the moment, other initramfs
-# variants may be supported in the future.
-dist-kernel_build_initramfs() {
-   debug-print-function ${FUNCNAME} "${@}"
-
-   [[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments"
-   local output=${1}
-   local version=${2}
-
-   local rel_image_path=$(dist-kernel_get_image_path)
-   local image=${output%/*}/${rel_image_path##*/}
-
-   local args=(
-   --force
-   # if uefi=yes is used, dracut needs to locate the kernel image
-   --kernel-image "${image}"
-
-   # positional arguments
-   "${output}" "${version}"
-   )
-
-   ebegin "Building initramfs via dracut"
-   dracut "${args[@]}"
-   eend ${?} || die -n "Building initramfs failed"
-}
-
 # @FUNCTION: dist-kernel_get_image_path
 # @DESCRIPTION:
 # Get relative kernel image path specific to the current ${ARCH}.
@@ -123,26 +79,6 @@ dist-kernel_install_kernel() {
local image=${2}
local map=${3}
 
-   if has_version "<=sys-kernel/installkernel-gentoo-7"; then
-   # if dracut is used in uefi=yes mode, initrd will actually
-   # be a combined kernel+initramfs UEFI executable.  we can easily
-   # recognize it by PE magic (vs cpio for a regular initramfs)
-   local initrd=${image%/*}/initrd
-   local magic
-   [[ -s ${initrd} ]] && read -n 2 magic < "${initrd}"
-   if [[ ${magic} == MZ ]]; then
-   einfo "Combined UEFI kernel+initramfs executable found"
-   # install the combined executable in place of kernel
-   image=${initrd%/*}/uki.efi
-   mv "${initrd}" "${image}" || die
-
-   if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
-   # Ensure the uki is signed if dracut hasn't 
already done so.
-   secureboot_sign_efi_file "${image}"
-   fi
-   fi
-   fi
-
ebegin "Installing the kernel via installkernel"
# note: .config is taken relatively to System.map;
# initrd relatively to bzImage
@@ -159,10 +95,6 @@ dist-kernel_install_kernel() {
 # The function will determine whether  is actually
 # a dist-kernel, and whether initramfs was used.
 #
-# With sys-kernel/installkernel-systemd, or version 8 or greater of
-# sys-kernel/installkernel-gentoo, the generation of the initrd via dracut
-# is handled by kernel-install instead.
-#
 # This function is to be used in pkg_postinst() of ebuilds installing
 # kernel modules that are included in the initramfs.
 dist-kernel_reinstall_initramfs() {
@@ -180,16 +112,6 @@ dist-kernel_reinstall_initramfs() {
return
fi
 
-   if has_version "<=sys-kernel/installkernel-gentoo-7"; then
-   local initramfs_path=${image_path%/*}/initrd
-   if [[ ! -f ${initramfs_path} && ! -f 
${initramfs_path%/*}/uki.efi ]]; then
-   einfo "No initramfs or uki found at ${image_path}"
-   return
-   fi
-
-   dist-kernel_build_initramfs 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-07 Thread Michał Górny
commit: 0b6386e9c6a803f72182310d5832c32069f625f6
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Dec 26 16:26:34 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Jan  7 11:36:43 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b6386e9

meson.eclass: Pass -Db_lto=false globally

Pass `-Db_lto=false` globally to force-disable appending `-flto`
in projects that default to it.  In Gentoo, users enable LTO via setting
`*FLAGS` manually.

If a package really needs to pass `-Db_lto=true` because the build
system enables some custom logic based on it, `tc-is-lto` can be used
to determine whether LTO is enabled, and then `-Db_lto=true` can be
passed explicitly by the ebuild.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/meson.eclass | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index f7cf8a0722ba..12e9dd4bd9a6 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -1,4 +1,4 @@
-# Copyright 2017-2023 Gentoo Authors
+# Copyright 2017-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: meson.eclass
@@ -334,6 +334,10 @@ meson_src_configure() {
# It's Gentoo policy to not have builds die on blanket -Werror, 
as it's
# an upstream development matter. bug #754279.
-Dwerror=false
+
+   # Prevent projects from enabling LTO by default.  In Gentoo, 
LTO is
+   # enabled via setting *FLAGS appropriately.
+   -Db_lto=false
)
 
if [[ -n ${EMESON_BUILDTYPE} ]]; then



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-06 Thread Michał Górny
commit: ac13860623411d8cbc8ce99029c059e86860fa45
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Jan  6 21:49:29 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Jan  6 21:52:18 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac138606

llvm.org.eclass: Add 18.0.0_pre20240106 snapshot

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 635f1b6b1dcc..94b1fbbe0d0a 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
 
case ${PV} in
+   18.0.0_pre20240106)
+   
EGIT_COMMIT=a085402ef54379758e6c996dbaedfcb92ad222b5
+   ;;
18.0.0_pre20231228)

EGIT_COMMIT=a700298b3d538452915703268ca18f7f8f7537e6
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-05 Thread Michał Górny
commit: 635892e8f096afd7d1f3ea2f91a6906122b2e5ca
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Jan  3 13:32:33 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jan  5 20:18:53 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=635892e8

python-utils-r1.eclass, distutils-r1.eclass: Add EPYTEST_TIMEOUT

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass|  3 +++
 eclass/python-utils-r1.eclass | 22 ++
 2 files changed, 25 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 428551662845..c0d1992ccce0 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -618,6 +618,9 @@ distutils_enable_tests() {
;;
pytest)
test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]'
+   if [[ -n ${EPYTEST_TIMEOUT} ]]; then
+   test_pkgs+=' 
dev-python/pytest-timeout[${PYTHON_USEDEP}]'
+   fi
if [[ ${EPYTEST_XDIST} ]]; then
test_pkgs+=' 
dev-python/pytest-xdist[${PYTHON_USEDEP}]'
fi

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a82379ce876b..3af3cbdb075e 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1296,6 +1296,16 @@ _python_check_occluded_packages() {
 # parameter, when calling epytest.  The listed files will be entirely
 # skipped from test collection.
 
+# @ECLASS_VARIABLE: EPYTEST_TIMEOUT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set to a non-empty value, enables pytest-timeout plugin and sets
+# test timeout to the specified value.  This variable can be either set
+# in ebuilds that are known to hang, or by user to prevent hangs
+# in automated test environments.  If this variable is set prior
+# to calling distutils_enable_tests in distutils-r1, a test dependency
+# on dev-python/pytest-timeout is added automatically.
+
 # @ECLASS_VARIABLE: EPYTEST_XDIST
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -1381,6 +1391,18 @@ epytest() {
)
fi
 
+   if [[ -n ${EPYTEST_TIMEOUT} ]]; then
+   if [[ ${PYTEST_PLUGINS} != *pytest_timeout* ]]; then
+   args+=(
+   -p timeout
+   )
+   fi
+
+   args+=(
+   "--timeout=${EPYTEST_TIMEOUT}"
+   )
+   fi
+
if [[ ${EPYTEST_XDIST} ]]; then
local jobs=${EPYTEST_JOBS:-$(makeopts_jobs)}
if [[ ${jobs} -gt 1 ]]; then



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-05 Thread Michał Górny
commit: d14f213a798851966c3bfbdb0cdb6d220e3b95bd
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Jan  2 16:41:32 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jan  5 20:18:51 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d14f213a

distutils-r1.eclass: Add support for dev builds in setuptools-rust

Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 5a99ba88eddb..428551662845 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: distutils-r1.eclass
@@ -1401,6 +1401,9 @@ distutils_pep517_install() {
)
;;
setuptools)
+   if in_iuse debug && use debug; then
+   local -x SETUPTOOLS_RUST_CARGO_PROFILE=dev
+   fi
if [[ -n ${DISTUTILS_ARGS[@]} ]]; then
config_settings=$(
"${EPYTHON}" - "${DISTUTILS_ARGS[@]}" 
<<-EOF || die



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-05 Thread Michał Górny
commit: b774995375493a943dddc68dfdaedb39438aa28b
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Jan  3 13:24:27 2024 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jan  5 20:18:51 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7749953

python-utils-r1.eclass: Minimize pytest tempdir retention

Signed-off-by: Michał Górny  gentoo.org>

 eclass/python-utils-r1.eclass | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index abb55bd2e942..a82379ce876b 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: python-utils-r1.eclass
@@ -1344,6 +1344,11 @@ epytest() {
# count is more precise when we're dealing with a large number
# of tests
-o console_output_style=count
+   # minimize the temporary directory retention, the test suites
+   # of some packages can grow them pretty large and normally
+   # we don't need to preserve them
+   -o tmp_path_retention_count=0
+   -o tmp_path_retention_policy=failed
)
 
if [[ ! ${PYTEST_DISABLE_PLUGIN_AUTOLOAD} ]]; then



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-05 Thread Michał Górny
commit: 92001837418f3a50e6571c0f533520b42f90d488
Author: Michał Górny  gentoo  org>
AuthorDate: Sun Dec 24 12:25:39 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Jan  5 10:54:19 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92001837

cargo.eclass: Support PKGBUMPING to avoid fetching/unpacking crates

Support using the PKGBUMPING variable set by pkgbump/pkgdiff-mg to avoid
respectively fetching and unpacking crates, to speed up using these
tools.

Closes: https://github.com/gentoo/gentoo/pull/34459
Signed-off-by: Michał Górny  gentoo.org>

 eclass/cargo.eclass | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 1e1a6e3ddfe2..7bdd548b0df8 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: cargo.eclass
@@ -175,6 +175,9 @@ ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
 # If no arguments are provided, it uses the CRATES variable.
 # The value is set as CARGO_CRATE_URIS.
 _cargo_set_crate_uris() {
+   # when called by pkgbump, do not fetch crates
+   [[ ${PKGBUMPING} == ${PVR} ]] && return
+
local -r regex='^([a-zA-Z0-9_\-]+)-([0-9]+\.[0-9]+\.[0-9]+.*)$'
local crates=${1}
local crate
@@ -331,6 +334,9 @@ cargo_src_unpack() {
for archive in ${A}; do
case "${archive}" in
*.crate)
+   # when called by pkgdiff-mg, do not unpack 
crates
+   [[ ${PKGBUMPING} == ${PVR} ]] && continue
+
ebegin "Loading ${archive} into Cargo registry"
tar -xf "${DISTDIR}"/${archive} -C 
"${ECARGO_VENDOR}/" || die
# generate sha256sum of the crate itself as 
cargo needs this



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-03 Thread Sam James
commit: c39ad19b66bbfb45c5ff0226e8b6b13f861e306a
Author: Sam James  gentoo  org>
AuthorDate: Wed Jan  3 10:41:48 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jan  3 10:41:48 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c39ad19b

qt5-build.eclass: use test-flags-CCLD for -Wl,--undefined-version

Signed-off-by: Sam James  gentoo.org>

 eclass/qt5-build.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 0cb64f3010ea..0e416e253cc2 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -233,8 +233,8 @@ qt5-build_src_configure() {
 
# Workaround for bug #915203
# Upstream: https://bugreports.qt.io/browse/QTBUG-111514
-   if [[ ${PN} != qtcore ]] && tc-ld-is-lld ; then
-   append-ldflags -Wl,--undefined-version
+   if [[ ${PN} != qtcore ]] ; then
+   append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
fi
 
# many bugs, no one to fix



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-03 Thread Ionen Wolkens
commit: ae5ffe9ef3c004cb61c9423bfd9199f3c33bd632
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Wed Jan  3 09:27:16 2024 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Wed Jan  3 09:34:04 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae5ffe9e

qt6-build.eclass: cleanup deprecated qt6_symlink_binary_to_path

No consumers left for a while, kind of forgot about it.

If overlays were packaging additional Qt modules, their facing links
should be handled automatically even if this function call fails.
That is, unless they were doing extra links not suggested by upstream.
At that point I'd suggest doing a normal dosym, or better yet report
it to Qt so that it will be suggested in user_facing_tool_links.txt
for future versions.

Signed-off-by: Ionen Wolkens  gentoo.org>

 eclass/qt6-build.eclass | 16 +---
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index 0e439e946af3..561a4fe20422 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -1,4 +1,4 @@
-# Copyright 2021-2023 Gentoo Authors
+# Copyright 2021-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: qt6-build.eclass
@@ -196,20 +196,6 @@ qt_feature() {
echo "-DQT_FEATURE_${2:-${1}}=$(usex ${1} ON OFF)"
 }
 
-# @FUNCTION: qt6_symlink_binary_to_path
-# @USAGE:  [suffix]
-# @DESCRIPTION:
-# Symlink a given binary from QT6_BINDIR to QT6_PREFIX/bin, with
-# optional suffix.
-#
-# Note: deprecated, will be removed when no consumers left in-tree,
-# see internal the _qt6-build_create_user_facing_links
-qt6_symlink_binary_to_path() {
-   [[ ${#} -ge 1 ]] || die "${FUNCNAME}() requires at least one argument"
-
-   dosym -r "${QT6_BINDIR}"/${1} /usr/bin/${1}${2}
-}
-
 ##  Internal functions  ##
 
 # @FUNCTION: _qt6-build_create_user_facing_links



[gentoo-commits] repo/gentoo:master commit in: eclass/

2024-01-02 Thread Sam James
commit: 123a15873fd98645c10f23fdf759226bac842eb8
Author: Eli Schwartz  gmail  com>
AuthorDate: Wed Jan  3 05:56:27 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jan  3 06:20:23 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=123a1587

apache-2.eclass: drop outdated symlink

In commit 90f738b661e9e6cf903cd2a65418a6e00482c19f, the destination got
deleted. apxs is no longer in the sbin directory. On split-usr systems,
sbin isn't a symlink to bin, so the symlink is also *broken*.

There are two general solutions here:

- Fix the symlink to symlink to /usr/bin instead.

- This symlink was created in 2007 as a temporary porting measure, and
  it is long past time it got removed. So just remove it.

We go with option 2. One more legacy hack gone.

Bug: https://bugs.gentoo.org/177697
Fixes: 90f738b661e9e6cf903cd2a65418a6e00482c19f
Closes: https://bugs.gentoo.org/921191
Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 eclass/apache-2.eclass | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index 86e5dc2a93ba..e1489eb282ac 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: apache-2.eclass
@@ -634,9 +634,6 @@ apache-2_src_install() {
dosym /etc/init.d/apache2 /usr/sbin/apache2ctl
fi
 
-   # provide legacy symlink for apxs, bug 177697
-   dosym apxs /usr/sbin/apxs2
-
# install some documentation
dodoc ABOUT_APACHE CHANGES LAYOUT README README.platforms VERSIONING
dodoc "${GENTOO_PATCHDIR}"/docs/*



[gentoo-commits] repo/gentoo:master commit in: eclass/, www-servers/apache/

2023-12-31 Thread Sam James
commit: d696d0acb609eb856c3052c8f9f3aea848d2d6d1
Author: Eli Schwartz  gmail  com>
AuthorDate: Sun Dec 31 03:56:40 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Dec 31 17:36:16 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d696d0ac

www-servers/apache: apache-2.eclass: inline USE=split-usr

It is undesirable and should be removed, which requires inlining into
each ebuild and then removing it in a revbump.

Bug: https://bugs.gentoo.org/502384
Signed-off-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 eclass/apache-2.eclass | 2 +-
 www-servers/apache/apache-2.4.57-r5.ebuild | 3 +++
 www-servers/apache/apache-2.4.57.ebuild| 3 +++
 www-servers/apache/apache-2.4.58-r1.ebuild | 3 +++
 www-servers/apache/apache-2.4.58.ebuild| 3 +++
 5 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/eclass/apache-2.eclass b/eclass/apache-2.eclass
index 4da2e151fed2..86e5dc2a93ba 100644
--- a/eclass/apache-2.eclass
+++ b/eclass/apache-2.eclass
@@ -88,7 +88,7 @@ SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2
 # built-in modules
 
 IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}"
-IUSE="${IUSE} debug doc gdbm ldap selinux ssl static suexec +suexec-caps 
suexec-syslog split-usr threads"
+IUSE="${IUSE} debug doc gdbm ldap selinux ssl static suexec +suexec-caps 
suexec-syslog threads"
 
 for module in ${IUSE_MODULES} ; do
case ${module} in

diff --git a/www-servers/apache/apache-2.4.57-r5.ebuild 
b/www-servers/apache/apache-2.4.57-r5.ebuild
index 649085501170..02691c5f39d9 100644
--- a/www-servers/apache/apache-2.4.57-r5.ebuild
+++ b/www-servers/apache/apache-2.4.57-r5.ebuild
@@ -8,6 +8,9 @@ GENTOO_PATCHSTAMP="20231011"
 GENTOO_DEVELOPER="graaff"
 GENTOO_PATCHNAME="gentoo-apache-2.4.57-r5"
 
+# ancient hack: bug #502384
+IUSE="split-usr"
+
 # IUSE/USE_EXPAND magic
 IUSE_MPMS_FORK="prefork"
 IUSE_MPMS_THREAD="event worker"

diff --git a/www-servers/apache/apache-2.4.57.ebuild 
b/www-servers/apache/apache-2.4.57.ebuild
index c5ef6767c8fe..cf939d694848 100644
--- a/www-servers/apache/apache-2.4.57.ebuild
+++ b/www-servers/apache/apache-2.4.57.ebuild
@@ -8,6 +8,9 @@ GENTOO_PATCHSTAMP="20210212"
 GENTOO_DEVELOPER="polynomial-c"
 GENTOO_PATCHNAME="gentoo-apache-2.4.46-r6"
 
+# ancient hack: bug #502384
+IUSE="split-usr"
+
 # IUSE/USE_EXPAND magic
 IUSE_MPMS_FORK="prefork"
 IUSE_MPMS_THREAD="event worker"

diff --git a/www-servers/apache/apache-2.4.58-r1.ebuild 
b/www-servers/apache/apache-2.4.58-r1.ebuild
index 9ca9e8c742c0..7a858a9b3cbf 100644
--- a/www-servers/apache/apache-2.4.58-r1.ebuild
+++ b/www-servers/apache/apache-2.4.58-r1.ebuild
@@ -8,6 +8,9 @@ GENTOO_PATCHSTAMP="20231019"
 GENTOO_DEVELOPER="graaff"
 GENTOO_PATCHNAME="gentoo-apache-2.4.58"
 
+# ancient hack: bug #502384
+IUSE="split-usr"
+
 # IUSE/USE_EXPAND magic
 IUSE_MPMS_FORK="prefork"
 IUSE_MPMS_THREAD="event worker"

diff --git a/www-servers/apache/apache-2.4.58.ebuild 
b/www-servers/apache/apache-2.4.58.ebuild
index aa9944f2f03f..af8224e7166b 100644
--- a/www-servers/apache/apache-2.4.58.ebuild
+++ b/www-servers/apache/apache-2.4.58.ebuild
@@ -8,6 +8,9 @@ GENTOO_PATCHSTAMP="20231019"
 GENTOO_DEVELOPER="graaff"
 GENTOO_PATCHNAME="gentoo-apache-2.4.58"
 
+# ancient hack: bug #502384
+IUSE="split-usr"
+
 # IUSE/USE_EXPAND magic
 IUSE_MPMS_FORK="prefork"
 IUSE_MPMS_THREAD="event worker"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Michał Górny
commit: 59e3804695ddfd8749aeb717421818122f1185cc
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Dec 28 08:58:57 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 30 16:19:09 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59e38046

linux-mod-r1.eclass: Add USE=modules-compress

Add a `modules-compress` USE flag to explicitly control kernel module
compression.  When the flag is disabled, modules are installed
uncompressed even if the kernel supports compression (which is going
to be the case for new sys-kernel/gentoo-kernel* builds).  When it is
enabled, the eclass compresses modules using the compressor configured,
or fails if no compression is supported.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/linux-mod-r1.eclass | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 44fc927c3a70..54df2406e5c7 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -111,7 +111,7 @@ _LINUX_MOD_R1_ECLASS=1
 
 inherit edo linux-info multiprocessing toolchain-funcs
 
-IUSE="dist-kernel modules-sign +strip ${MODULES_OPTIONAL_IUSE}"
+IUSE="dist-kernel modules-compress modules-sign +strip 
${MODULES_OPTIONAL_IUSE}"
 
 RDEPEND="
sys-apps/kmod[tools]
@@ -835,6 +835,8 @@ _modules_prepare_toolchain() {
 # If enabled in the kernel configuration, this compresses the given
 # modules using the same format.
 _modules_process_compress() {
+   use modules-compress || return
+
local -a compress
if linux_chkconfig_present MODULE_COMPRESS_XZ; then
compress=(
@@ -853,13 +855,13 @@ _modules_process_compress() {
fi
elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
compress=(zstd -qT"$(makeopts_jobs)" --rm)
+   else
+   die "USE=modules-compress enabled but no MODULE_COMPRESS* 
configured"
fi
 
-   if [[ -v compress ]]; then
-   # could fail, assumes have commands that were needed for the 
kernel
-   einfo "Compressing modules (matching the kernel configuration) 
..."
-   edob "${compress[@]}" -- "${@}"
-   fi
+   # could fail, assumes have commands that were needed for the kernel
+   einfo "Compressing modules (matching the kernel configuration) ..."
+   edob "${compress[@]}" -- "${@}"
 }
 
 # @FUNCTION: _modules_process_depmod.d



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Michał Górny
commit: eaefe0f676c685a0e52682eb125db34a1f54da9b
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Dec 28 08:51:02 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 30 16:19:09 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaefe0f6

linux-mod.eclass: Fix xz compression options

Match xz compression options to the ones used by the kernel,
as the xz decoder used by the kernel supports only a subset of the xz
format.

Bug: https://bugs.gentoo.org/920837
Signed-off-by: Michał Górny  gentoo.org>

 eclass/linux-mod.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index 26d8cac47ef0..c71ace53aa00 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -689,7 +689,9 @@ linux-mod_src_install() {
# and similarly compress the module being built if != NONE.
 
if linux_chkconfig_present MODULE_COMPRESS_XZ; then
-   xz -T$(makeopts_jobs) --memlimit-compress=50% -q 
${modulename}.${KV_OBJ} || die "Compressing ${modulename}.${KV_OBJ} with xz 
failed"
+   # match kernel compression options for compatibility
+   # https://bugs.gentoo.org/920837
+   xz -T$(makeopts_jobs) --memlimit-compress=50% -q 
--check=crc32 --lzma2=dict=1MiB ${modulename}.${KV_OBJ} || die "Compressing 
${modulename}.${KV_OBJ} with xz failed"
doins ${modulename}.${KV_OBJ}.xz
KV_OBJ_COMPRESS_EXT=".xz"
elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Michał Górny
commit: 95ba46e4f667b31003463109f424cb9995d75435
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Dec 28 08:55:21 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 30 16:19:08 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95ba46e4

kernel-{build,install}.eclass: Rename flag to modules-compress

Signed-off-by: Michał Górny  gentoo.org>

 eclass/kernel-build.eclass   | 4 ++--
 eclass/kernel-install.eclass | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 29ee9f86e7e2..28f111ec998b 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -284,7 +284,7 @@ kernel-build_src_install() {
dostrip -x /lib/modules
 
local compress=()
-   if [[ ${KERNEL_IUSE_GENERIC_UKI} ]] && ! use module-compress; then
+   if [[ ${KERNEL_IUSE_GENERIC_UKI} ]] && ! use modules-compress; then
compress+=(
# force installing uncompressed modules even if 
compression
# is enabled via config
@@ -560,7 +560,7 @@ kernel-build_merge_configs() {
 
# Only semi-related but let's use that to avoid changing stable ebuilds.
if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
-   # NB: we enable this even with USE=-module-compress, in order
+   # NB: we enable this even with USE=-modules-compress, in order
# to support both uncompressed and compressed modules in 
prebuilt
# kernels
cat <<-EOF > "${WORKDIR}/module-compress.config" || die

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 8c4d5c14fc03..af4f5d839b0e 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -79,7 +79,7 @@ _IDEPEND_BASE="
 
 LICENSE="GPL-2"
 if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
-   IUSE+=" generic-uki module-compress"
+   IUSE+=" generic-uki modules-compress"
# https://github.com/AndrewAmmerlaan/dist-kernel-log-to-licenses
# This script can help with generating the array below, keep in mind
# that it is not a fully automatic solution, i.e. use flags will
@@ -762,11 +762,11 @@ kernel-install_pkg_config() {
 
 # @FUNCTION: kernel-install_compress_modules
 # @DESCRIPTION:
-# Compress modules installed in ED, if USE=module-compress is enabled.
+# Compress modules installed in ED, if USE=modules-compress is enabled.
 kernel-install_compress_modules() {
debug-print-function ${FUNCNAME} "${@}"
 
-   if use module-compress; then
+   if use modules-compress; then
einfo "Compressing kernel modules ..."
# taken from scripts/Makefile.modinst
find "${ED}/lib" -name '*.ko' -exec \



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Michał Górny
commit: b7ca73e4faafc23a554eb6eecc4b513449d41d66
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Dec 28 11:31:33 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 30 16:19:11 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7ca73e4

linux-mod-r1.eclass: Call module cleanup in postinst

Closes: https://github.com/gentoo/gentoo/pull/34513
Signed-off-by: Michał Górny  gentoo.org>

 eclass/linux-mod-r1.eclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 54df2406e5c7..67a4b64eb481 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -109,7 +109,7 @@ esac
 if [[ ! ${_LINUX_MOD_R1_ECLASS} ]]; then
 _LINUX_MOD_R1_ECLASS=1
 
-inherit edo linux-info multiprocessing toolchain-funcs
+inherit dist-kernel-utils edo linux-info multiprocessing toolchain-funcs
 
 IUSE="dist-kernel modules-compress modules-sign +strip 
${MODULES_OPTIONAL_IUSE}"
 
@@ -468,6 +468,7 @@ linux-mod-r1_pkg_postinst() {
debug-print-function ${FUNCNAME[0]} "${@}"
_modules_check_function ${#} 0 0 || return 0
 
+   dist-kernel_compressed_module_cleanup "${EROOT}/lib/modules/${KV_FULL}"
_modules_update_depmod
 
# post_process ensures modules were installed and that the eclass' USE



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Michał Górny
commit: cce4904e482d770bd521b87908de42c81c71f23b
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Dec 28 11:29:16 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 30 16:19:11 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cce4904e

kernel-install.eclass: Call module cleanup in postinst

Signed-off-by: Michał Górny  gentoo.org>

 eclass/kernel-install.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index af4f5d839b0e..b4c3d5fe7b4d 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -592,6 +592,7 @@ kernel-install_pkg_preinst() {
die "Release file ${relfile} not installed!"
local release
release="$(<"${relfile}")" || die
+   DIST_KERNEL_RELEASE="${release}"
 
# perform the version check for release ebuilds only
if [[ ${PV} != * ]]; then
@@ -706,6 +707,8 @@ kernel-install_pkg_postinst() {
 
local dir_ver=${PV}${KV_LOCALVERSION}
kernel-install_update_symlink "${EROOT}/usr/src/linux" "${dir_ver}"
+   dist-kernel_compressed_module_cleanup \
+   "${EROOT}/lib/modules/${DIST_KERNEL_RELEASE}"
 
if [[ -z ${ROOT} ]]; then
kernel-install_install_all "${dir_ver}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Michał Górny
commit: 44d713565ee89e990ac10a438fef1126e47330b1
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Dec 28 11:22:29 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 30 16:19:10 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44d71356

dist-kernel-utils.eclass: Add dist-kernel_compressed_module_cleanup

Signed-off-by: Michał Górny  gentoo.org>

 eclass/dist-kernel-utils.eclass | 37 +
 1 file changed, 37 insertions(+)

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 67cb802151b2..8ccffd038474 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -210,5 +210,42 @@ dist-kernel_PV_to_KV() {
echo "${kv}"
 }
 
+# @FUNCTION: dist-kernel_compressed_module_cleanup
+# @USAGE: 
+# @DESCRIPTION:
+# Traverse path for duplicate (un)compressed modules and remove all
+# but the newest variant.
+dist-kernel_compressed_module_cleanup() {
+   debug-print-function ${FUNCNAME} "${@}"
+
+   [[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments"
+   local path=${1}
+   local basename f
+
+   while read -r basename; do
+   local prev=
+   for f in "${path}/${basename}"{,.gz,.xz,.zst}; do
+   if [[ ! -e ${f} ]]; then
+   continue
+   elif [[ -z ${prev} ]]; then
+   prev=${f}
+   elif [[ ${f} -nt ${prev} ]]; then
+   rm -v "${prev}" || die
+   prev=${f}
+   else
+   rm -v "${f}" || die
+   fi
+   done
+   done < <(
+   cd "${path}" &&
+   find -type f \
+   \( -name '*.ko' \
+   -o -name '*.ko.gz' \
+   -o -name '*.ko.xz' \
+   -o -name '*.ko.zst' \
+   \) | sed -e 's:[.]\(gz\|xz\|zst\)$::' | sort | uniq -d 
|| die
+   )
+}
+
 _DIST_KERNEL_UTILS=1
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Ulrich Müller
commit: cc14f7c6f8444a27dd6c354f9701cd276a6b78a6
Author: Ulrich Müller  gentoo  org>
AuthorDate: Fri Dec 29 12:44:09 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec 30 15:33:44 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc14f7c6

ssl-cert.eclass: Drop openssl slot dependency

Suggested-by: David Seifert  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/ssl-cert.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index 48cb10db16e8..240f9f12cc91 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -42,10 +42,10 @@ _SSL_CERT_ECLASS=1
 
 if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
if [[ "${SSL_CERT_MANDATORY}" == "0" ]]; then
-   BDEPEND="${SSL_CERT_USE}? ( dev-libs/openssl:0 )"
+   BDEPEND="${SSL_CERT_USE}? ( dev-libs/openssl )"
IUSE="${SSL_CERT_USE}"
else
-   BDEPEND="dev-libs/openssl:0"
+   BDEPEND="dev-libs/openssl"
fi
 fi
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-30 Thread Ulrich Müller
commit: 7634c57d18a6f96b0be8cfca8f8400dff6a1304b
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Dec 28 09:31:44 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec 30 15:33:39 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7634c57d

ssl-cert.eclass: Drop support for EAPI 6

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/ssl-cert.eclass | 19 ---
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index 0453f0fbf665..48cb10db16e8 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -6,7 +6,7 @@
 # maintainer-nee...@gentoo.org
 # @AUTHOR:
 # Max Kalika 
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: Eclass for SSL certificates
 # @DESCRIPTION:
 # This eclass implements a standard installation procedure for installing
@@ -15,7 +15,7 @@
 # "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
 
 case ${EAPI} in
-   6|7|8) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -42,22 +42,11 @@ _SSL_CERT_ECLASS=1
 
 if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
if [[ "${SSL_CERT_MANDATORY}" == "0" ]]; then
-   SSL_DEPEND="${SSL_CERT_USE}? ( dev-libs/openssl:0 )"
+   BDEPEND="${SSL_CERT_USE}? ( dev-libs/openssl:0 )"
IUSE="${SSL_CERT_USE}"
else
-   SSL_DEPEND="dev-libs/openssl:0"
+   BDEPEND="dev-libs/openssl:0"
fi
-
-   case "${EAPI}" in
-   6)
-   DEPEND="${SSL_DEPEND}"
-   ;;
-   *)
-   BDEPEND="${SSL_DEPEND}"
-   ;;
-   esac
-
-   unset SSL_DEPEND
 fi
 
 # @FUNCTION: gen_cnf



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-28 Thread Michał Górny
commit: c22c3ddc11cef922d0bbfe048cd7b05d9a97c97e
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Dec 28 13:50:34 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Dec 28 15:05:55 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c22c3ddc

llvm.org.eclass: Add 18.0.0_pre20231228 snapshot

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index ca80f6ee6f40..635f1b6b1dcc 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
 
case ${PV} in
+   18.0.0_pre20231228)
+   
EGIT_COMMIT=a700298b3d538452915703268ca18f7f8f7537e6
+   ;;
18.0.0_pre20231222)

EGIT_COMMIT=17858ce6f3d24f994f6ad8c899bfa4eed39f739d
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-27 Thread Ionen Wolkens
commit: 44db9a32adb0632ae6ae77dd63c83c010387bb5d
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Thu Dec 28 05:04:14 2023 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Thu Dec 28 06:29:00 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44db9a32

linux-mod-r1.eclass: use kernel compatible xz settings for >=kmod-31

When the non-default CONFIG_KERNEL_DECOMPRESS option is set in
kernel >6.4, >=kmod-31 will let the kernel handle decompression
rather than use xz-utils.

...but kernel XZ decompressor is more limited, so need to use the
same options the kernel does. -T/--threads fortunately is harmless
to keep on top.

Note crc32 is already the default and main problem was dict size, but
still specify in case someone has e.g. XZ_DEFAULTS="--check=sha256".

Closes: https://bugs.gentoo.org/920837
Signed-off-by: Ionen Wolkens  gentoo.org>

 eclass/linux-mod-r1.eclass | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 858fb0628070..44fc927c3a70 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -837,7 +837,14 @@ _modules_prepare_toolchain() {
 _modules_process_compress() {
local -a compress
if linux_chkconfig_present MODULE_COMPRESS_XZ; then
-   compress=(xz -qT"$(makeopts_jobs)" --memlimit-compress=50%)
+   compress=(
+   xz -q
+   --memlimit-compress=50%
+   --threads="$(makeopts_jobs)"
+   # match options from kernel's Makefile.modinst (bug 
#920837)
+   --check=crc32
+   --lzma2=dict=1MiB
+   )
elif linux_chkconfig_present MODULE_COMPRESS_GZIP; then
if type -P pigz &>/dev/null; then
compress=(pigz -p"$(makeopts_jobs)")



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-27 Thread Sam James
commit: 92523f4fa2b9f09b88f4316bd021a737d3a2447e
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 27 19:32:31 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 27 20:57:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92523f4f

autotools.eclass: optimize dependency generation (elide subshells)

Signed-off-by: Sam James  gentoo.org>

 eclass/autotools.eclass | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 5e214686572a..5eab543409a5 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -105,7 +105,9 @@ if [[ -n ${WANT_AUTOMAKE} ]] ; then
# the autoreconf tool, so this requirement is correct, 
bug #401605.
;;
latest)
-   _automake_atom="|| ( $(printf 
'>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }) )"
+   printf -v _automake_atom_tmp 
'>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }
+   _automake_atom="|| ( ${_automake_atom_tmp} )"
+   unset _automake_atom_tmp
;;
*)
_automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*"
@@ -128,7 +130,9 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
_autoconf_atom=">=sys-devel/autoconf-2.71-r6"
;;
latest)
-   _autoconf_atom="|| ( $(printf 
'>=sys-devel/autoconf-%s:%s ' ${_LATEST_AUTOCONF[@]/:/ }) )"
+   printf -v _autoconf_atom_tmp 
'>=sys-devel/autoconf-%s:%s ' ${_LATEST_AUTOCONF[@]/:/ }
+   _autoconf_atom="|| ( ${_autoconf_atom_tmp} )"
+   unset _autoconf_atom_tmp
;;
*)
die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-27 Thread Sam James
commit: 41a10cf44b022f88604535fc5d4fd6c0c62cbf55
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 27 19:38:21 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 27 20:57:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41a10cf4

autotools.eclass: treat 2.5 as 2.71 for now

Having an unbound dependency (no slot) causes all sorts of problems. Add cases
for each slot.

I think we should really have the slots aligned to PV and slotmove as required 
but
let's handle that another time. This would've hidden the original bug at least.

Bug: https://bugs.gentoo.org/920822
Signed-off-by: Sam James  gentoo.org>

 eclass/autotools.eclass | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 5eab543409a5..5c266c701e25 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -118,6 +118,8 @@ fi
 
 if [[ -n ${WANT_AUTOCONF} ]] ; then
# TODO: Fix the slot mess here and just have proper PV-as-SLOT?
+   # TODO: Make _LATEST_AUTOCONF an assoc. array and instead iterate over
+   # its keys.
case ${WANT_AUTOCONF} in
none)
# some packages don't require autoconf at all
@@ -127,7 +129,13 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
_autoconf_atom=">=sys-devel/autoconf-2.13-r7:2.1"
;;
2.5)
-   _autoconf_atom=">=sys-devel/autoconf-2.71-r6"
+   _autoconf_atom=">=sys-devel/autoconf-2.71-r6:2.71"
+   ;;
+   2.69)
+   _autoconf_atom=">=sys-devel/autoconf-2.69-r9:2.69"
+   ;;
+   2.71)
+   _autoconf_atom=">=sys-devel/autoconf-2.71-r6:2.71"
;;
latest)
printf -v _autoconf_atom_tmp 
'>=sys-devel/autoconf-%s:%s ' ${_LATEST_AUTOCONF[@]/:/ }



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-27 Thread Sam James
commit: 231ef1261161871334dd6d9abc92b8859e29587c
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 27 19:52:48 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 27 20:57:09 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=231ef126

autotools.eclass: drop 2.13/2.69 from _WANT_AUTOCONF

If people want/need these, they should explicitly state it in the ebuild 
(although
please port to a newer version!)

Otherwise, we're going to be saying that autoconf-2.13 and such could satisfy
all ebuilds unless they explicitly say something else which is rather unlikely.

Signed-off-by: Sam James  gentoo.org>

 eclass/autotools.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 5c266c701e25..7f48c78739c7 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -72,7 +72,7 @@ inherit gnuconfig libtool
 # Do NOT change this variable in your ebuilds!
 # If you want to force a newer minor version, you can specify the correct
 # WANT value by using a colon:  :
-_LATEST_AUTOCONF=( 2.72-r1:2.72 2.71-r7:2.71 2.71-r6:2.71 2.69-r9:2.69 
2.13-r8:2.1 )
+_LATEST_AUTOCONF=( 2.72-r1:2.72 2.71-r6:2.71 )
 
 # @ECLASS_VARIABLE: _LATEST_AUTOMAKE
 # @INTERNAL



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-27 Thread Sam James
commit: 1506b5a78e5b82da08788046791385cce65349eb
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 27 19:29:41 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 27 20:57:07 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1506b5a7

autotools.eclass: avoid deprecated backticks

Signed-off-by: Sam James  gentoo.org>

 eclass/autotools.eclass | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 7d72565bfe08..5e214686572a 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -99,12 +99,17 @@ _automake_atom="sys-devel/automake"
 _autoconf_atom="sys-devel/autoconf"
 if [[ -n ${WANT_AUTOMAKE} ]] ; then
case ${WANT_AUTOMAKE} in
-   # Even if the package doesn't use automake, we still need to 
depend
-   # on it because we run aclocal to process m4 macros.  This 
matches
-   # the autoreconf tool, so this requirement is correct, bug 
#401605.
-   none) ;;
-   latest) _automake_atom="|| ( `printf 
'>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )" ;;
-   *) _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*";;
+   none)
+   # Even if the package doesn't use automake, we still 
need to depend
+   # on it because we run aclocal to process m4 macros.  
This matches
+   # the autoreconf tool, so this requirement is correct, 
bug #401605.
+   ;;
+   latest)
+   _automake_atom="|| ( $(printf 
'>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }) )"
+   ;;
+   *)
+   _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*"
+   ;;
esac
export WANT_AUTOMAKE
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-27 Thread Sam James
commit: 00a85ac2928bf83ec841a08904b2e80008276ce2
Author: Sam James  gentoo  org>
AuthorDate: Wed Dec 27 19:12:04 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 27 20:57:06 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00a85ac2

autotools.eclass: rework WANT_AUTOCONF handling

For automake, we enumerate each of the automake slots in _WANT_AUTOMAKE and
use this to handle setting WANT_AUTOMAKE accordingly if the ebuild (or user,
I suppose) haven't set WANT_AUTOMAKE themselves. This means that we can easily
rollover to the latest installed on a system (and we also pull it in via 
_WANT_AUTOMAKE
which is used for dependencies) because WANT_AUTOMAKE is based on the slots in
_WANT_AUTOMAKE intersected with whatever is installed on the system.

For autoconf, we weren't doing any of that, and were just hardcoding whatever
the latest slot is! That's error prone on bumps but it also wasn't really 
possible
to get right as-is without marking a new slot stable because of the entanglement
between the dependencies, WANT_AUTOCONF, and no intersection being done
(WANT_AUTOCONF wasn't dynamic at all).

We now implement a similar scheme for autoconf as we already had for automake. 
This
fixes the case where WANT_AUTOCONF="latest" in an ebuild (the default), 
autoconf:2.71
isn't installed, but autoconf:2.72 is.

This sometimes worked before if the latest dep was slotted rather than unslotted
like it is now (see below for why that's not easy to just fix) because the new 
slot
would never get pulled in and hence the older slot which aligned with 
WANT_AUTOCONF's
hardcoded value would be available.

(I still think we should consider slotmoving older autoconfs but that's 
something
to discuss and possibly do another time. See TODO.)

Bug: https://bugs.gentoo.org/827852
Bug: https://bugs.gentoo.org/893434
Closes: https://bugs.gentoo.org/920822
Signed-off-by: Sam James  gentoo.org>

 eclass/autotools.eclass | 73 +
 1 file changed, 67 insertions(+), 6 deletions(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 77124e098aac..7d72565bfe08 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -53,6 +53,27 @@ inherit gnuconfig libtool
 # Do you want libtool?  Valid values here are "latest" and "none".
 : "${WANT_LIBTOOL:=latest}"
 
+# @ECLASS_VARIABLE: _LATEST_AUTOCONF
+# @INTERNAL
+# @DESCRIPTION:
+# CONSTANT!
+# The latest major unstable and stable version/slot of autoconf available
+# on each arch.
+# Only add unstable version if it is in a different slot than latest stable
+# version.
+# List latest unstable version first to boost testing adoption rate because
+# most package manager dependency resolver will pick the first suitable
+# version.
+# If a newer slot is stable on any arch, and is NOT reflected in this list,
+# then circular dependencies may arise during emerge @system bootstraps.
+#
+# See bug #312315 and bug #465732 for further information and context.
+#
+# Do NOT change this variable in your ebuilds!
+# If you want to force a newer minor version, you can specify the correct
+# WANT value by using a colon:  :
+_LATEST_AUTOCONF=( 2.72-r1:2.72 2.71-r7:2.71 2.71-r6:2.71 2.69-r9:2.69 
2.13-r8:2.1 )
+
 # @ECLASS_VARIABLE: _LATEST_AUTOMAKE
 # @INTERNAL
 # @DESCRIPTION:
@@ -89,12 +110,24 @@ if [[ -n ${WANT_AUTOMAKE} ]] ; then
 fi
 
 if [[ -n ${WANT_AUTOCONF} ]] ; then
+   # TODO: Fix the slot mess here and just have proper PV-as-SLOT?
case ${WANT_AUTOCONF} in
-   none)   _autoconf_atom="" ;; # some packages don't require 
autoconf at all
-   2.1)_autoconf_atom=">=sys-devel/autoconf-2.13-r7:2.1" ;;
-   # if you change the "latest" version here, change also 
autotools_env_setup
-   latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.71-r5" ;;
-   *)  die "Invalid WANT_AUTOCONF value 
'${WANT_AUTOCONF}'" ;;
+   none)
+   # some packages don't require autoconf at all
+   _autoconf_atom=""
+   ;;
+   2.1)
+   _autoconf_atom=">=sys-devel/autoconf-2.13-r7:2.1"
+   ;;
+   2.5)
+   _autoconf_atom=">=sys-devel/autoconf-2.71-r6"
+   ;;
+   latest)
+   _autoconf_atom="|| ( $(printf 
'>=sys-devel/autoconf-%s:%s ' ${_LATEST_AUTOCONF[@]/:/ }) )"
+   ;;
+   *)
+   die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'"
+   ;;
esac
export WANT_AUTOCONF
 fi
@@ -535,7 +568,35 @@ autotools_env_setup() {
[[ ${WANT_AUTOMAKE} == "latest" ]] && die "Cannot find 
the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"
fi
fi
-   [[ ${WANT_AUTOCONF} == "latest" ]] && export 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-26 Thread Michał Górny
commit: 2aea6c3ff2181ad96187e456a3307609fd288d4c
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Dec 25 14:45:59 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Dec 26 14:02:09 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aea6c3f

toolchain-funcs.eclass: Add tc-is-lto function

Add a function to check whether the C compiler is using LTO.
To determine this, we compile a dummy source unit.  In the GCC case,
we check whether the resulting object file contains ".gnu.lto*"
sections.  In the clang case, we check whether a valid LLVM bytecode
file was output rather than a regular object.

The goal of this change is to reduce the amount of USE=lto abuse,
and have a consistent cross-package way of enabling LTO via setting
appropriate CFLAGS and CXXFLAGS.

Closes: https://github.com/gentoo/gentoo/pull/34470
Signed-off-by: Michał Górny  gentoo.org>

 eclass/toolchain-funcs.eclass | 21 +
 1 file changed, 21 insertions(+)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 5da93063866b..cde84e6f34c8 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1230,4 +1230,25 @@ tc-get-build-ptr-size() {
die "Could not determine CBUILD pointer size"
 }
 
+# @FUNCTION: tc-is-lto
+# @RETURN: Shell true if we are using LTO, shell false otherwise
+tc-is-lto() {
+   local f="${T}/test-lto.o"
+
+   case $(tc-get-compiler-type) in
+   clang)
+   $(tc-getCC) ${CFLAGS} -c -o "${f}" -x c - <<<"" || die
+   # If LTO is used, clang will output bytecode and 
llvm-bcanalyzer
+   # will run successfully.  Otherwise, it will output 
plain object
+   # file and llvm-bcanalyzer will exit with error.
+   llvm-bcanalyzer "${f}" &>/dev/null && return 0
+   ;;
+   gcc)
+   $(tc-getCC) ${CFLAGS} -c -o "${f}" -x c - <<<"" || die
+   [[ $($(tc-getREADELF) -S "${f}") == *.gnu.lto* ]] && 
return 0
+   ;;
+   esac
+   return 1
+}
+
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-25 Thread Michał Górny
commit: 8fbafcbda119ea44a75bfd8b29cf8631d5aff80e
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Dec 25 08:07:23 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Dec 25 15:47:32 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fbafcbd

kernel-{build,install}.eclass: Support XZ module compression

When KERNEL_IUSE_GENERIC_UKI is set (to gatekeep for new ebuilds),
enable XZ module compression in kernel and add IUSE=module-compress.
When the flag is enabled, the modules are installed .xz compressed
per the config.  When it is disabled, they are installed uncompressed
but the kernel retains module compression support.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/kernel-build.eclass   | 22 +-
 eclass/kernel-install.eclass |  5 -
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 70eb1243fcbc..69a2689601fa 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -283,9 +283,18 @@ kernel-build_src_install() {
# Modules were already stripped by the kernel build system
dostrip -x /lib/modules
 
+   local compress=()
+   if [[ ${KERNEL_IUSE_GENERIC_UKI} ]] && ! use module-compress; then
+   compress+=(
+   # force installing uncompressed modules even if 
compression
+   # is enabled via config
+   suffix-y=
+   )
+   fi
+
emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
INSTALL_MOD_PATH="${ED}" INSTALL_MOD_STRIP="${strip_args}" \
-   INSTALL_PATH="${ED}/boot" "${targets[@]}"
+   INSTALL_PATH="${ED}/boot" "${compress[@]}" "${targets[@]}"
 
# note: we're using mv rather than doins to save space and time
# install main and arch-specific headers first, and scripts
@@ -547,6 +556,17 @@ kernel-build_merge_configs() {
fi
fi
 
+   # Only semi-related but let's use that to avoid changing stable ebuilds.
+   if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
+   # NB: we enable this even with USE=-module-compress, in order
+   # to support both uncompressed and compressed modules in 
prebuilt
+   # kernels
+   cat <<-EOF > "${WORKDIR}/module-compress.config" || die
+   CONFIG_MODULE_COMPRESS_XZ=y
+   EOF
+   merge_configs+=( "${WORKDIR}/module-compress.config" )
+   fi
+
if [[ ${#user_configs[@]} -gt 0 ]]; then
elog "User config files are being applied:"
local x

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 9612700a1431..c04a21789a7c 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -79,7 +79,7 @@ _IDEPEND_BASE="
 
 LICENSE="GPL-2"
 if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
-   IUSE+=" generic-uki"
+   IUSE+=" generic-uki module-compress"
# https://github.com/AndrewAmmerlaan/dist-kernel-log-to-licenses
# This script can help with generating the array below, keep in mind
# that it is not a fully automatic solution, i.e. use flags will
@@ -200,6 +200,9 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
generic-uki? ( ${INITRD_PACKAGES[@]} )
"
 
+   RDEPEND+="
+   sys-apps/kmod[lzma]
+   "
IDEPEND="
generic-uki? (
|| (



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-25 Thread Michał Górny
commit: 824d48dae0571e5e728d93bb08619c7f0f6d10f2
Author: Michał Górny  gentoo  org>
AuthorDate: Mon Dec 25 08:36:01 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Dec 25 15:47:33 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=824d48da

kernel-install.eclass: Add kernel-install_compress_modules

Add a function to compress modules manually.  It will be used
in sys-kernel/gentoo-kernel-bin.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/kernel-install.eclass | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index c04a21789a7c..1cbb7d54d3de 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -765,6 +765,17 @@ kernel-install_pkg_config() {
kernel-install_install_all "${PV}${KV_LOCALVERSION}"
 }
 
+# @FUNCTION: kernel-install_compress_modules
+# @DESCRIPTION:
+# Compress modules installed in ED, if USE=module-compress is enabled.
+kernel-install_compress_modules() {
+   debug-print-function ${FUNCNAME} "${@}"
+
+   if use module-compress; then
+   # taken from scripts/Makefile.modinst
+   find "${ED}/lib" -name '*.ko' -exec \
+   xz --check=crc32 --lzma2=dict=1MiB {} + || die
+   fi
 fi
 
 EXPORT_FUNCTIONS src_test pkg_preinst pkg_postinst pkg_prerm pkg_postrm



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-25 Thread Michał Górny
commit: 7d9c4d95eb340cfc80232665f8ed85c3f8c11bb2
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Mon Dec 25 08:29:36 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Mon Dec 25 15:47:33 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d9c4d95

kernel-{build,install}.eclass: drop plymouth for generic-uki

plymouth pulls in drm, and drm includes all gpu drivers and their firmware
especially the firmware files are very big. The whole thing costs us
15M on each initrd, and therefore gpkg. Also exclude the netronome
drivers, these also have ridiculously large firmware files.

Signed-off-by: Andrew Ammerlaan  gentoo.org>
Signed-off-by: Michał Górny  gentoo.org>

 eclass/kernel-build.eclass   | 8 +---
 eclass/kernel-install.eclass | 8 +++-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 69a2689601fa..29ee9f86e7e2 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -395,10 +395,10 @@ kernel-build_src_install() {
 
local dracut_modules=(
base bash btrfs cifs crypt crypt-gpg crypt-loop 
dbus dbus-daemon
-   dm dmraid drm dracut-systemd fido2 i18n fs-lib 
kernel-modules
+   dm dmraid dracut-systemd fido2 i18n fs-lib 
kernel-modules
kernel-network-modules kernel-modules-extra 
lunmask lvm nbd
mdraid modsign network network-manager nfs 
nvdimm nvmf pcsc
-   pkcs11 plymouth qemu qemu-net resume rngd 
rootfs-block shutdown
+   pkcs11 qemu qemu-net resume rngd rootfs-block 
shutdown
systemd systemd-ac-power systemd-ask-password 
systemd-initrd
systemd-integritysetup systemd-pcrphase 
systemd-sysusers
systemd-udevd systemd-veritysetup terminfo 
tpm2-tss udev-rules
@@ -423,6 +423,8 @@ kernel-build_src_install() {
--reproducible
--ro-mnt
--modules "${dracut_modules[*]}"
+   # Pulls in huge firmware files
+   --omit-drivers "nfp"
)
 
# Tries to update ld cache
@@ -433,7 +435,7 @@ kernel-build_src_install() {
local ukify_args=(
--linux="${image}"
--initrd="${image%/*}/initrd"
-   --cmdline="root=/dev/gpt-auto-root ro quiet 
splash"
+   --cmdline="root=/dev/gpt-auto-root ro"
--uname="${dir_ver}"
--output="${image%/*}/uki.efi"
)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 1cbb7d54d3de..8c4d5c14fc03 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -127,7 +127,6 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
["dev-libs/openssl"]="Apache-2.0"
["dev-libs/userspace-rcu"]="LGPL-2.1"
["media-libs/libmtp"]="LGPL-2.1"
-   ["media-libs/libpng"]="libpng2"
["media-libs/libv4l"]="LGPL-2.1+"
["net-dns/c-ares"]="MIT ISC"
["net-dns/libidn2"]="|| ( GPL-2+ LGPL-3+ ) GPL-3+ unicode"
@@ -159,15 +158,12 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
["sys-apps/nvme-cli"]="GPL-2 GPL-2+"
["sys-apps/pcsc-lite"]="BSD ISC MIT GPL-3+ GPL-2"
["sys-apps/rng-tools"]="GPL-2"
-   ["sys-apps/sandbox"]="GPL-2"
["sys-apps/sed"]="GPL-3+"
["sys-apps/shadow"]="BSD GPL-2"

["sys-apps/systemd[boot(-),cryptsetup,pkcs11,policykit,tpm,ukify(-)]"]="GPL-2 
LGPL-2.1 MIT public-domain"
["sys-apps/util-linux"]="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT 
public-domain"
["sys-auth/polkit"]="LGPL-2"
["sys-block/nbd"]="GPL-2"
-   ["sys-block/open-isns"]="LGPL-2.1"
-   ["sys-boot/plymouth"]="GPL-2"
["sys-devel/gcc"]="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ 
gcc-runtime-library-exception-3.1 ) FDL-1.3+"
["sys-fs/btrfs-progs"]="GPL-2"
["sys-fs/cryptsetup"]="GPL-2+"
@@ -192,7 +188,6 @@ if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
["sys-libs/readline"]="GPL-3+"
["sys-libs/zlib"]="ZLIB"
["sys-process/procps"]="GPL-2+ LGPL-2+ LGPL-2.1+"
-   ["x11-libs/libdrm"]="MIT"
["amd64? ( sys-firmware/intel-microcode )"]="amd64? ( 
intel-ucode )"
["x86? ( sys-firmware/intel-microcode )"]="x86? ( intel-ucode )"
)

[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-25 Thread Hans de Graaff
commit: d18249523bf04913d041c7b28e3104a76db14553
Author: Hans de Graaff  gentoo  org>
AuthorDate: Mon Dec 25 09:02:13 2023 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Mon Dec 25 09:02:42 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1824952

eclass/ruby-utils.eclass: prepare for ruby33

Signed-off-by: Hans de Graaff  gentoo.org>

 eclass/ruby-utils.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass
index 48d701a3ebc7..789f57ce25f6 100644
--- a/eclass/ruby-utils.eclass
+++ b/eclass/ruby-utils.eclass
@@ -35,14 +35,14 @@ if [[ ! ${_RUBY_UTILS} ]]; then
 RUBY_TARGETS_PREFERENCE="ruby31 "
 
 # All other active ruby targets
-RUBY_TARGETS_PREFERENCE+="ruby32"
+RUBY_TARGETS_PREFERENCE+="ruby32 ruby33"
 
 _ruby_implementation_depend() {
local rubypn=
local rubyslot=
 
case $1 in
-   ruby1[89]|ruby2[0-7]|ruby3[0-2])
+   ruby1[89]|ruby2[0-7]|ruby3[0-3])
rubypn="dev-lang/ruby"
rubyslot=":${1:4:1}.${1:5}"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-24 Thread Andrew Ammerlaan
commit: 34681b83914b7710bdd29070a31d6c88b9334354
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Sat Dec 23 18:13:16 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sun Dec 24 12:35:19 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34681b83

eclass/kernel-install.eclass: warn if USE=-initramfs

Signed-off-by: Andrew Ammerlaan  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34450
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/kernel-install.eclass | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index d2b3b94123d4..9612700a1431 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -554,6 +554,20 @@ kernel-install_pkg_pretend() {
elog "emerge --config ${CATEGORY}/${PN}:${SLOT}"
fi
fi
+
+   if ! use initramfs && ! has_version "${CATEGORY}/${PN}[-initramfs]"; 
then
+   ewarn
+   ewarn "WARNING: The standard configuration of the Gentoo 
distribution"
+   ewarn "kernels requires an initramfs! You have disabled the 
initramfs"
+   ewarn "USE flag and as a result dracut was not pulled in as a 
dependency."
+   ewarn "Please ensure that you are either overriding the 
standard"
+   ewarn "configuration or that an alternative initramfs 
generation plugin"
+   ewarn "is installed for your installkernel implementation!"
+   ewarn
+   ewarn "This is an advanced use case, you are on your own to 
ensure"
+   ewarn "that your system is bootable!"
+   ewarn
+   fi
 }
 
 # @FUNCTION: kernel-install_src_test



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-24 Thread Andrew Ammerlaan
commit: 625697454aa6f2b0819f204c3b2fef93714572b7
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Sun Dec 24 10:22:51 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sun Dec 24 11:46:44 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62569745

kernel-{build,install}.eclass: compress generic initrd with xz

Some basic benchmarks:
-rw--- 1 root root 103494321 Dec 24 11:10 bzip2
-rw--- 1 root root 112179814 Dec 24 11:02 gzip-nostrip
-rw--- 1 root root 112179814 Dec 24 11:06 gzip-strip
-rw--- 1 root root 112179814 Dec 24 11:08 gzip-strip-aggressive
-rw--- 1 root root 130847597 Dec 24 11:19 lz4
-rw--- 1 root root  66948253 Dec 24 11:13 lzma
-rw--- 1 root root 124285638 Dec 24 11:18 lzop
-rw--- 1 root root  80242444 Dec 24 11:14 xz
-rw--- 1 root root  66744036 Dec 24 11:59 xz-9e--check
-rw--- 1 root root  85917687 Dec 24 11:20 zstd

Strip does nothing, which makes sense since portage already did this.
xz is our size champion so pick this one to compress our initrd

With this change the generic UKI is:82515840, versus
My own hostonly UKI of the same kernel version: 29390720.
Which is still 2.8 times larger, but significantly better then the 5 times
larger we had before!

Signed-off-by: Andrew Ammerlaan  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34024
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/kernel-build.eclass   | 1 +
 eclass/kernel-install.eclass | 7 +++
 2 files changed, 8 insertions(+)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 2253f4d854d1..70eb1243fcbc 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -403,6 +403,7 @@ kernel-build_src_install() {
--kmoddir "${ED}/lib/modules/${dir_ver}"
--kver "${dir_ver}"
--verbose
+   --compress="xz -9e --check=crc32"
--no-hostonly
--no-hostonly-cmdline
--no-hostonly-i18n

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 919a5d11fd84..d2b3b94123d4 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -430,6 +430,12 @@ kernel-install_test() {
> "${T}"/empty-file || die
mkdir -p "${T}"/empty-directory || die
 
+   local compress="gzip"
+   if [[ ${KERNEL_IUSE_GENERIC_UKI} ]] && use generic-uki; then
+   # Test with same compression method as the generic initrd
+   compress="xz -9e --check=crc32"
+   fi
+
dracut \
--conf "${T}"/empty-file \
--confdir "${T}"/empty-directory \
@@ -439,6 +445,7 @@ kernel-install_test() {
--omit "${omit_mods[*]}" \
--nostrip \
--no-early-microcode \
+   --compress="${compress}" \
"${T}/initrd" "${version}" || die
 
kernel-install_create_qemu_image "${T}/fs.img"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-23 Thread Sam James
commit: fb34618c547e61049007838d3ea7fa46055b0027
Author: Sam James  gentoo  org>
AuthorDate: Sat Dec 23 18:11:12 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec 23 18:11:12 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb34618c

flag-o-matic.eclass: allow -fdebug-default-version=*

Reported by leio. We need this for e.g. Clang to produce output that debugedit
is happy with.

Signed-off-by: Sam James  gentoo.org>

 eclass/flag-o-matic.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 0e427649c015..500ceb5941a8 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -81,6 +81,7 @@ _setup-allowed-flags() {
-gstabs -gstabs+
-gz
-glldb
+   '-fdebug-default-version=*'
 
# Cosmetic/output related, see e.g. bug #830534
-fno-diagnostics-color '-fmessage-length=*'



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-23 Thread Michał Górny
commit: 31e23ab264c3a1479d57261f49a6aa7411152619
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Tue Dec 19 08:03:22 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec 23 17:35:08 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31e23ab2

kernel-{build,install}.eclass: add USE=generic-uki

- optionally build a generic unified kernel image
- only install this uki.efi in any binary generated binpkgs, this saves space
- extract the initrd and kernel image from the uki in pkg_postinst
- own image, initrd and uki install paths

Signed-off-by: Andrew Ammerlaan  gentoo.org>
Signed-off-by: Michał Górny  gentoo.org>

 eclass/kernel-build.eclass   |  99 +++-
 eclass/kernel-install.eclass | 212 +--
 2 files changed, 301 insertions(+), 10 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 7a041a8aacdf..2253f4d854d1 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -107,6 +107,12 @@ if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then
"
 fi
 
+if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
+   BDEPEND+="
+   generic-uki? ( ${!INITRD_PACKAGES[@]} )
+   "
+fi
+
 # @FUNCTION: kernel-build_pkg_setup
 # @DESCRIPTION:
 # Call python-any-r1 and secureboot pkg_setup
@@ -333,7 +339,8 @@ kernel-build_src_install() {
# build/Module.symvers does not exist if CONFIG_MODULES is not set.
[[ -f build/Module.symvers ]] && doins build/Module.symvers
local image_path=$(dist-kernel_get_image_path)
-   cp -p "build/${image_path}" "${ED}${kernel_dir}/${image_path}" || die
+   local image=${ED}${kernel_dir}/${image_path}
+   cp -p "build/${image_path}" "${image}" || die
 
# If a key was generated, copy it so external modules can be signed
local suffix
@@ -366,7 +373,95 @@ kernel-build_src_install() {
dosym "../../../${kernel_dir}" "/lib/modules/${module_ver}/source"
 
if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
-   secureboot_sign_efi_file "${ED}${kernel_dir}/${image_path}"
+   secureboot_sign_efi_file "${image}"
+   fi
+
+   if [[ ${KERNEL_IUSE_GENERIC_UKI} ]]; then
+   if use generic-uki; then
+   # NB: if you pass a path that does not exist or is not 
a regular
+   # file/directory, dracut will silently ignore it and 
use the default
+   # https://github.com/dracutdevs/dracut/issues/1136
+   > "${T}"/empty-file || die
+   mkdir -p "${T}"/empty-directory || die
+
+   local dracut_modules=(
+   base bash btrfs cifs crypt crypt-gpg crypt-loop 
dbus dbus-daemon
+   dm dmraid drm dracut-systemd fido2 i18n fs-lib 
kernel-modules
+   kernel-network-modules kernel-modules-extra 
lunmask lvm nbd
+   mdraid modsign network network-manager nfs 
nvdimm nvmf pcsc
+   pkcs11 plymouth qemu qemu-net resume rngd 
rootfs-block shutdown
+   systemd systemd-ac-power systemd-ask-password 
systemd-initrd
+   systemd-integritysetup systemd-pcrphase 
systemd-sysusers
+   systemd-udevd systemd-veritysetup terminfo 
tpm2-tss udev-rules
+   uefi-lib usrmount virtiofs
+   )
+
+   local dracut_args=(
+   --conf "${T}/empty-file"
+   --confdir "${T}/empty-directory"
+   --kernel-image "${image}"
+   --kmoddir "${ED}/lib/modules/${dir_ver}"
+   --kver "${dir_ver}"
+   --verbose
+   --no-hostonly
+   --no-hostonly-cmdline
+   --no-hostonly-i18n
+   --no-machineid
+   --nostrip
+   --no-uefi
+   --early-microcode
+   --reproducible
+   --ro-mnt
+   --modules "${dracut_modules[*]}"
+   )
+
+   # Tries to update ld cache
+   addpredict /etc/ld.so.cache~
+   dracut "${dracut_args[@]}" "${image%/*}/initrd" ||
+   die "Failed to generate initramfs"
+
+   local ukify_args=(
+   --linux="${image}"
+   --initrd="${image%/*}/initrd"
+   --cmdline="root=/dev/gpt-auto-root ro quiet 
splash"
+   

[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-22 Thread Michał Górny
commit: 33b7d4b46913255843c267ab5ec6fe6f1159be70
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Dec 22 16:44:34 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Dec 22 16:44:34 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33b7d4b4

llvm.org.eclass: Remove support for old snapshots

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 6 --
 1 file changed, 6 deletions(-)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 228be0fde5a1..ca80f6ee6f40 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -78,12 +78,6 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
18.0.0_pre20231215)

EGIT_COMMIT=d37ced88809cb4d2df57ec80887b3f8801ca719b
;;
-   18.0.0_pre20231129)
-   
EGIT_COMMIT=6a4489a73337907d52e7eaf3716f3de9008e6e53
-   ;;
-   18.0.0_pre20231119)
-   
EGIT_COMMIT=5237193b87721134541f228e28edfd544a9c8ac8
-   ;;
*)
die "Unknown snapshot: ${PV}"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-21 Thread Andreas Sturmlechner
commit: 06be91a0a500faf62b2c80989be933ca460593b1
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sat Dec 16 11:04:56 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Dec 21 16:36:48 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06be91a0

plasma.kde.org.eclass: Exclude kwayland-integration from SLOT=5 blockers

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/plasma.kde.org.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/plasma.kde.org.eclass b/eclass/plasma.kde.org.eclass
index 7a829b859676..ad4511f63536 100644
--- a/eclass/plasma.kde.org.eclass
+++ b/eclass/plasma.kde.org.eclass
@@ -81,6 +81,7 @@ if [[ ${_PSLOT} == 6 ]]; then
case ${PN} in
kglobalacceld | \
kwayland | \
+   kwayland-integration | \
libplasma | \
ocean-sound-theme | \
plasma-activities | \



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-21 Thread Andreas Sturmlechner
commit: 48d9b407c3f776931ad0872df5dfd97bb56621ac
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Dec 21 16:26:27 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Thu Dec 21 16:34:17 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48d9b407

ecm.eclass: Drop dev-qt/qtbase:6[test]

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/ecm.eclass | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 3c102d669caf..c633fe39d98c 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -129,8 +129,8 @@ fi
 # "forceoptional-recursive".
 # Default value is "false", except for CATEGORY=kde-frameworks where it is
 # set to "true". If set to "false", do nothing.
-# For any other value, add "test" to IUSE and DEPEND on dev-qt/qtbase:6[test]
-# (for KF5: dev-qt/qttest:5). If set to "optional", build with
+# For any other value, add "test" to IUSE (and for KF5 DEPEND on
+# dev-qt/qttest:5). If set to "optional", build with
 # -DCMAKE_DISABLE_FIND_PACKAGE_Qt${_KFSLOT}Test=ON when USE=!test. If set
 # to "forceoptional", punt Qt${_KFSLOT}Test dependency and ignore "autotests",
 # "test", "tests" subdirs from top-level CMakeLists.txt when USE=!test.
@@ -260,9 +260,7 @@ esac
 case ${ECM_TEST} in
true|optional|forceoptional|forceoptional-recursive)
IUSE+=" test"
-   if [[ ${_KFSLOT} == 6 ]]; then
-   DEPEND+=" test? ( dev-qt/qtbase:${_KFSLOT}[test] )"
-   else
+   if [[ ${_KFSLOT} == 5 ]]; then
DEPEND+=" test? ( dev-qt/qttest:${_KFSLOT} )"
fi
RESTRICT+=" !test? ( test )"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-20 Thread Sam James
commit: 142a99106adf15e03c3fc45a490730bdb7b56980
Author: Alfred Wingate  protonmail  com>
AuthorDate: Wed Nov 22 11:40:52 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Dec 20 13:41:02 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=142a9910

git-r3.eclass: fetch remote_ref in the mirror clone type

* Handles scenarios where commits in submodules are orphaned.

Closes: https://bugs.gentoo.org/917746
Bug: https://bugs.gentoo.org/503332
Signed-off-by: Alfred Wingate  protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33935
Signed-off-by: Sam James  gentoo.org>

 eclass/git-r3.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
index a08845364296..de89fdc3a223 100644
--- a/eclass/git-r3.eclass
+++ b/eclass/git-r3.eclass
@@ -682,6 +682,8 @@ git-r3_fetch() {
# and HEAD in case we need the default 
branch
# (we keep it in refs/git-r3 since 
otherwise --prune interferes)
"+HEAD:refs/git-r3/HEAD"
+   # fetch the specifc commit_ref to deal 
with orphan commits
+   "${remote_ref}"
)
else # single or shallow
local fetch_l fetch_r



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-19 Thread Ionen Wolkens
commit: 132c1d9248ae30e2f32e37f82fae3d7f711895ce
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Tue Dec 19 19:48:56 2023 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Tue Dec 19 20:31:21 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=132c1d92

qt6-build.eclass: cleanup <6.5.3 and 6.6.0 workarounds

Only >=6.6.1 in the tree now and, even if someone wanted to
restore 6.5.2, lacking this wouldn't prevent typical usage.

Signed-off-by: Ionen Wolkens  gentoo.org>

 eclass/qt6-build.eclass | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index 6f002bc799ad..0e439e946af3 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -66,11 +66,7 @@ readonly QT6_BUILD_TYPE
 
 HOMEPAGE="https://www.qt.io/;
 LICENSE="|| ( GPL-2 GPL-3 LGPL-3 ) FDL-1.3"
-if ver_test ${PV} -ge 6.5.3; then
-   SLOT=6/${PV%%_*}
-else
-   SLOT=6/${PV%.*} # TODO: remove this after <6.5.3 is gone
-fi
+SLOT=6/${PV%%_*}
 
 if [[ ${PN} != qttranslations ]]; then
IUSE="test"
@@ -257,13 +253,11 @@ _qt6-build_match_cpu_flags() {
[[ ${intrin} ]] && flags+=( -mno-${intrin} )
done
done < <(
-   # TODO: drop ver_test and ${fma} when <6.5.3 and 6.6.0 are gone
-   ver_test ${PV} -ge 6.5.3 && ver_test ${PV} -ne 6.6.0 && fma= || 
fma=fma
$(tc-getCXX) -E -P ${CXXFLAGS} ${CPPFLAGS} - <<-EOF | tail -n 2
#if defined(__GNUC__) && (defined(__x86_64__) || 
defined(__i386__))
#include 
#endif
-   avx2=__AVX2__ =__BMI__ =__BMI2__ =__F16C__ 
${fma}=__FMA__ =__LZCNT__ =__POPCNT__
+   avx2=__AVX2__ =__BMI__ =__BMI2__ =__F16C__ =__FMA__ 
=__LZCNT__ =__POPCNT__
avx512f=__AVX512F__ avx512bw=__AVX512BW__ 
avx512cd=__AVX512CD__ avx512dq=__AVX512DQ__ avx512vl=__AVX512VL__
EOF
assert



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-18 Thread WANG Xuerui
commit: ef4219fbf06a27fec86a85a6e4470fc0182fe862
Author: WANG Xuerui  gentoo  org>
AuthorDate: Fri Dec 15 09:43:16 2023 +
Commit: WANG Xuerui  gentoo  org>
CommitDate: Mon Dec 18 17:20:49 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef4219fb

kernel-build.eclass: ensure KERNEL_EFI_ZBOOT is probed in all cases

The several partially-supported arches (those relying on
USE=savedconfig) directly return in src_prepare(), hence previously the
CONFIG_EFI_ZBOOT probing didn't have a chance to run when building for
those arches, leading to wrong kernel artifact path and failed
src_install().

Move the probing to near the end of eclass src_configure(), so the flag
correctly reflects the reality in all circumstances.

Signed-off-by: WANG Xuerui  gentoo.org>

 eclass/kernel-build.eclass | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 6b692dc4f9a0..7a041a8aacdf 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -203,6 +203,12 @@ kernel-build_src_configure() {
.config)
fi
 
+   # If this is set by USE=secureboot or user config this will have an 
effect
+   # on the name of the output image. Set this variable to track this 
setting.
+   if grep -q "CONFIG_EFI_ZBOOT=y" .config; then
+   KERNEL_EFI_ZBOOT=1
+   fi
+
mkdir -p "${WORKDIR}"/modprep || die
mv .config "${WORKDIR}"/modprep/ || die
emake O="${WORKDIR}"/modprep "${MAKEARGS[@]}" olddefconfig
@@ -456,12 +462,6 @@ kernel-build_merge_configs() {
 
./scripts/kconfig/merge_config.sh -m -r \
.config "${merge_configs[@]}"  || die
-
-   # If this is set by USE=secureboot or user config this will have an 
effect
-   # on the name of the output image. Set this variable to track this 
setting.
-   if grep -q "CONFIG_EFI_ZBOOT=y" .config; then
-   KERNEL_EFI_ZBOOT=1
-   fi
 }
 
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-18 Thread WANG Xuerui
commit: cc1b29c1d43b412fb199d38bf5f2228ec5d8e050
Author: WANG Xuerui  gentoo  org>
AuthorDate: Fri Dec 15 08:30:21 2023 +
Commit: WANG Xuerui  gentoo  org>
CommitDate: Mon Dec 18 17:20:49 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc1b29c1

kernel-install.eclass: support loong in kernel-install_get_qemu_arch

Right now the loong profiles in Gentoo only cover the 64-bit ISA, so we
can unconditionally specify loongarch64 for QEMU.

Signed-off-by: WANG Xuerui  gentoo.org>

 eclass/kernel-install.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 22d8ce200016..c7118a720ba6 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -167,6 +167,9 @@ kernel-install_get_qemu_arch() {
arm64)
echo aarch64
;;
+   loong)
+   echo loongarch64
+   ;;
*)
die "${FUNCNAME}: unsupported ARCH=${ARCH}"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-18 Thread WANG Xuerui
commit: cae637be9cec73cd394c4ac02eac80e51ab93805
Author: WANG Xuerui  gentoo  org>
AuthorDate: Fri Dec 15 08:28:06 2023 +
Commit: WANG Xuerui  gentoo  org>
CommitDate: Mon Dec 18 17:20:49 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cae637be

dist-kernel-utils.eclass: support loong in dist-kernel_get_image_path

The filenames to use are taken from upstream:
https://github.com/torvalds/linux/blob/v6.6/arch/loongarch/boot/Makefile.

Signed-off-by: WANG Xuerui  gentoo.org>

 eclass/dist-kernel-utils.eclass | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 62750d1721a2..67cb802151b2 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -87,6 +87,13 @@ dist-kernel_get_image_path() {
echo arch/${ARCH}/boot/Image.gz
fi
;;
+   loong)
+   if [[ ${KERNEL_EFI_ZBOOT} ]]; then
+   echo arch/loongarch/boot/vmlinuz.efi
+   else
+   echo arch/loongarch/boot/vmlinux.elf
+   fi
+   ;;
arm)
echo arch/arm/boot/zImage
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-17 Thread Michał Górny
commit: 3f87d0f277763f1cd621a78e34eb226d89020863
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Dec 16 15:09:51 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sun Dec 17 11:23:01 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f87d0f2

distutils-r1.eclass: Call gpep517 via EPYTHON

Call gpep517 via EPYTHON, in order to make it possible to use any
plugins that were installed during python_compile() in python_test().
This is used in dev-python/setuptools-gettext that is tested
via building an example project relying on the plugin.

Signed-off-by: Michał Górny  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34312
Signed-off-by: Michał Górny  gentoo.org>

 eclass/distutils-r1.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 0a9815f2d459..5a99ba88eddb 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1243,7 +1243,7 @@ _distutils-r1_get_backend() {
if [[ -f pyproject.toml ]]; then
# if pyproject.toml exists, try getting the backend from it
# NB: this could fail if pyproject.toml doesn't list one
-   build_backend=$(gpep517 get-backend)
+   build_backend=$("${EPYTHON}" -m gpep517 get-backend)
fi
if [[ -z ${build_backend} && ${DISTUTILS_USE_PEP517} == setuptools &&
-f setup.py ]]
@@ -1317,7 +1317,7 @@ distutils_wheel_install() {
 
einfo "  Installing ${wheel##*/} to ${root}"
local cmd=(
-   gpep517 install-wheel
+   "${EPYTHON}" -m gpep517 install-wheel
--destdir="${root}"
--interpreter="${PYTHON}"
--prefix="${EPREFIX}/usr"
@@ -1446,7 +1446,7 @@ distutils_pep517_install() {
local build_backend=$(_distutils-r1_get_backend)
einfo "  Building the wheel for ${PWD#${WORKDIR}/} via ${build_backend}"
local cmd=(
-   gpep517 build-wheel
+   "${EPYTHON}" -m gpep517 build-wheel
--prefix="${EPREFIX}/usr"
--backend "${build_backend}"
--output-fd 3



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-15 Thread Michał Górny
commit: 0ced02cebc2bc27dc04dd74ea8c1106b28f3f59f
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Dec 15 17:49:32 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Dec 15 17:50:58 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ced02ce

llvm.org.eclass: Add 18.0.0_pre20231215 snapshot

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index a92308e38106..95657bab92c2 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
 
case ${PV} in
+   18.0.0_pre20231215)
+   
EGIT_COMMIT=d37ced88809cb4d2df57ec80887b3f8801ca719b
+   ;;
18.0.0_pre20231129)

EGIT_COMMIT=6a4489a73337907d52e7eaf3716f3de9008e6e53
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-14 Thread Sam James
commit: 2fa125d055dcfebe34acf09ea04ff89c42eeb19b
Author: Sam James  gentoo  org>
AuthorDate: Fri Dec 15 06:50:39 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Dec 15 06:50:39 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fa125d0

ninja-utils.eclass: use app-alternatives/ninja

Needed now that it's stable.

Bug: https://bugs.gentoo.org/919969
Closes: https://bugs.gentoo.org/917623
Signed-off-by: Sam James  gentoo.org>

 eclass/ninja-utils.eclass | 21 +
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/eclass/ninja-utils.eclass b/eclass/ninja-utils.eclass
index 859938cb3047..8b42c5849522 100644
--- a/eclass/ninja-utils.eclass
+++ b/eclass/ninja-utils.eclass
@@ -55,17 +55,7 @@ _NINJA_UTILS_ECLASS=1
 
 inherit multiprocessing
 
-case "${NINJA}" in
-   ninja)
-   NINJA_DEPEND=">=dev-util/ninja-1.8.2"
-   ;;
-   samu)
-   NINJA_DEPEND="dev-util/samurai"
-   ;;
-   *)
-   NINJA_DEPEND=""
-   ;;
-esac
+NINJA_DEPEND="app-alternatives/ninja"
 
 # @FUNCTION: get_NINJAOPTS
 # @DESCRIPTION:
@@ -84,7 +74,14 @@ get_NINJAOPTS() {
 # by the supplied arguments.  This function dies if ninja fails.  It
 # also supports being called via 'nonfatal'.
 eninja() {
-   [[ -n "${NINJA_DEPEND}" ]] || ewarn "Unknown value '${NINJA}' for 
\${NINJA}"
+   case "${NINJA}" in
+   ninja|samu)
+   ;;
+   *)
+   ewarn "Unknown value '${NINJA}' for \${NINJA}"
+   ;;
+   esac
+
local v
case "${NINJA_VERBOSE}" in
OFF) ;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-14 Thread Benda XU
commit: 76dc598ae5a2f447f3b9d9e69fb1499b5631c926
Author: Benda Xu  gentoo  org>
AuthorDate: Sun Nov 19 06:46:10 2023 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Dec 14 14:51:04 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76dc598a

rocm.eclass: add ROCM_SKIP_GLOBALS for the USE-flags exposure.

Low level ebuilds such as dev-util/hip and
dev-libs/rocm-opencl-runtime unconditionally supports all the AMDGPU
cards. They do not need to define amdgpu_targets_* USE-flags.  But
their src_test() call check_amdgpu() to confirm an AMDGPU is
available.

Reference: https://marc.info/?l=gentoo-dev=170045497732286
Signed-off-by: Benda Xu  gentoo.org>

 eclass/rocm.eclass | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/eclass/rocm.eclass b/eclass/rocm.eclass
index b78dfea1cc31..9804ecde97d0 100644
--- a/eclass/rocm.eclass
+++ b/eclass/rocm.eclass
@@ -125,11 +125,26 @@ _ROCM_ECLASS=1
 # DEPEND="sci-libs/rocBLAS[${ROCM_USEDEP}]"
 # @CODE
 
+# @ECLASS_VARIABLE: ROCM_SKIP_GLOBALS
+# @DESCRIPTION:
+# Controls whether _rocm_set_globals() is executed. This variable is for
+# ebuilds that call check_amdgpu() without the need to define amdgpu_targets_*
+# USE-flags, such as dev-util/hip and dev-libs/rocm-opencl-runtime.
+#
+# Example use:
+# @CODE
+# ROCM_SKIP_GLOBALS=1
+# inherit rocm
+# @CODE
+
 # @FUNCTION: _rocm_set_globals
 # @DESCRIPTION:
 # Set global variables useful to ebuilds: IUSE, ROCM_REQUIRED_USE, and
-# ROCM_USEDEP
+# ROCM_USEDEP, unless ROCM_SKIP_GLOBALS is set.
+
 _rocm_set_globals() {
+   [[ -n ${ROCM_SKIP_GLOBALS} ]] && return
+
# Two lists of AMDGPU_TARGETS of certain ROCm version.  Official support
# matrix:
# 
https://docs.amd.com/bundle/ROCm-Installation-Guide-v${ROCM_VERSION}/page/Prerequisite_Actions.html.
@@ -179,7 +194,6 @@ _rocm_set_globals() {
 _rocm_set_globals
 unset -f _rocm_set_globals
 
-
 # @FUNCTION: get_amdgpu_flags
 # @USAGE: get_amdgpu_flags
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-13 Thread Sam James
commit: 20b6ad4b80f78a26d20696c8437c1dfd753a61d2
Author: Sam James  gentoo  org>
AuthorDate: Thu Dec 14 05:34:10 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 14 05:34:10 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20b6ad4b

flag-o-matic.eclass: allow -mtls-dialect=* through filter

Most arches have this set anyway but amd64 is likely to switch to gnu2 finally
as well [0] so let's allow testing with it (and reverting to the old default
once it changes) by allowing -mtls-dialect=* through the filter.

[0] https://inbox.sourceware.org/gcc/871qbqp4of.fsf  
oldenburg.str.redhat.com/

Signed-off-by: Sam James  gentoo.org>

 eclass/flag-o-matic.eclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 40662f4f7d7b..0e427649c015 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -115,6 +115,10 @@ _setup-allowed-flags() {
-mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 
'-mcmodel=*'
-mstack-bias -mno-stack-bias -msecure-plt '-m*-toc' 
'-mfloat-abi=*'
 
+   # This is default on for a bunch of arches except amd64 in GCC
+   # already, and amd64 itself is planned too.
+   '-mtls-dialect=*'
+
# MIPS errata
-mfix-24k -mno-fix-24k -mfix-r4000 -mno-fix-r4000
-mfix-r4400 -mno-fix-r4400 -mfix-r5900 -mno-fix-r5900



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-13 Thread Sam James
commit: cdc20ce0b81578b10b206f5a027cbbc9c3777f9f
Author: Sam James  gentoo  org>
AuthorDate: Mon Dec 11 18:36:24 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 14 05:21:54 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdc20ce0

distutils-r1.eclass: mark DISTUTILS_EXT as @PRE_INHERIT

We set DEPEND and IUSE based on it.

Signed-off-by: Sam James  gentoo.org>

 eclass/distutils-r1.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 6d2640b29598..0a9815f2d459 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -50,6 +50,7 @@ case ${EAPI} in
 esac
 
 # @ECLASS_VARIABLE: DISTUTILS_EXT
+# @PRE_INHERIT
 # @DEFAULT_UNSET
 # @DESCRIPTION:
 # Set this variable to a non-null value if the package (possibly



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-13 Thread Sam James
commit: f1e0de88935f7374be100e3d408ed065f4095846
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Dec  2 12:40:25 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 14 05:21:53 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e0de88

python-utils-r1.eclass: epytest, use NO_COLOR rather than NOCOLOR

Update epytest to respect the modern NO_COLOR variable rather than
Portage's old NOCOLOR.  Adjust it to correctly check whether it is set
at all rather than to a specific value, to match the behavior of pytest
itself.

Signed-off-by: Michał Górny  gentoo.org>
Signed-off-by: Sam James  gentoo.org>

 eclass/python-utils-r1.eclass | 11 ++-
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 394f64a5d139..da9cb820840f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1336,15 +1336,8 @@ epytest() {
_python_check_EPYTHON
_python_check_occluded_packages
 
-   local color
-   case ${NOCOLOR} in
-   true|yes)
-   color=no
-   ;;
-   *)
-   color=yes
-   ;;
-   esac
+   local color=yes
+   [[ ${NO_COLOR} ]] && color=no
 
local args=(
# verbose progress reporting and tracebacks



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-13 Thread Sam James
commit: 786a1575c3be3d8680b2b4aec6254cbae90ab30d
Author: Sam James  gentoo  org>
AuthorDate: Mon Dec 11 18:26:39 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 14 05:21:54 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=786a1575

distutils-r1.eclass: workaround cython bug for Modern C

Pass -Wno-error=incompatible-pointer-types for now to avoid many dupes for
the same cython bug.

Bug: https://github.com/cython/cython/issues/2747
Bug: https://bugs.gentoo.org/918983
Bug: https://bugs.gentoo.org/919261
Bug: https://bugs.gentoo.org/919277
Signed-off-by: Sam James  gentoo.org>

 eclass/distutils-r1.eclass | 5 +
 1 file changed, 5 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 0a7b18e4a1a4..6d2640b29598 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1806,6 +1806,11 @@ distutils-r1_run_phase() {
tc-export AR CC CPP CXX
 
if [[ ${DISTUTILS_EXT} ]]; then
+   if [[ ${BDEPEND} == *dev-python/cython* ]] ; then
+   # Workaround for 
https://github.com/cython/cython/issues/2747 (bug #918983)
+   local -x CFLAGS="${CFLAGS} $(test-flags-CC 
-Wno-error=incompatible-pointer-types)"
+   fi
+
local -x CPPFLAGS="${CPPFLAGS} $(usex debug '-UNDEBUG' 
'-DNDEBUG')"
# always generate .c files from .pyx files to ensure we get 
latest
# bug fixes from Cython (this works only when setup.py is using



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-13 Thread Sam James
commit: 21f4a98581ee8f6266c57cb19ea8e7a33dfa81a6
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Dec  9 18:38:31 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 14 05:21:53 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21f4a985

python-utils-r1.eclass: Disable pytest-salt-factories by default

Signed-off-by: Michał Górny  gentoo.org>
Signed-off-by: Sam James  gentoo.org>

 eclass/python-utils-r1.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index da9cb820840f..188278f09212 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1382,6 +1382,8 @@ epytest() {
-p no:pytest-describe
-p no:plus
-p no:tavern
+   # does something to logging
+   -p no:salt-factories
)
fi
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-12 Thread Andreas Sturmlechner
commit: 2d51131e1ec7aa03f22a2f2864237fdc3d4dc146
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu Dec  7 17:56:50 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Tue Dec 12 12:56:01 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d51131e

qt5-build.eclass: filter-lto

Closes: https://bugs.gentoo.org/650488
Closes: https://bugs.gentoo.org/692078
Closes: https://bugs.gentoo.org/713850
Closes: https://bugs.gentoo.org/908419
Closes: https://bugs.gentoo.org/652158
Closes: https://bugs.gentoo.org/919043
Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/qt5-build.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index db333767fae6..223955f5ac12 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -237,6 +237,9 @@ qt5-build_src_configure() {
append-ldflags -Wl,--undefined-version
fi
 
+   # many bugs, no one to fix
+   filter-lto
+
qt5_foreach_target_subdir qt5_qmake
 }
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-11 Thread Andrew Ammerlaan
commit: 3e0c89e3b299928215dd505467e49f13f8d3
Author: Violet Purcell  inventati  org>
AuthorDate: Mon Nov 27 17:12:09 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Mon Dec 11 12:39:35 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e0c89e3

kernel-build.eclass: work around permissions issue with module signing

Currently, using a custom path for MODULES_SIGN_KEY requires the key to
be readable by portage:portage. This is not ideal for security, since
the file has to be either owned by portage:portage or readable by all
users in this case. Instead, export the contents of MODULES_SIGN_KEY to
a variable in pkg_setup, and then create a temporary file with it in
src_configure to ensure that the temporary key is readable by the user
that the kernel is being built as. The variable is then unset so it does
not end up in the final environment file.

Co-authored-by: Andrew Ammerlaan  gentoo.org>
Signed-off-by: Violet Purcell  inventati.org>
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/kernel-build.eclass | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index f5529c319f9f..6b692dc4f9a0 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -114,6 +114,13 @@ kernel-build_pkg_setup() {
python-any-r1_pkg_setup
if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then
secureboot_pkg_setup
+   if [[ -e ${MODULES_SIGN_KEY} && ${MODULES_SIGN_KEY} != pkcs11:* 
]]; then
+   if [[ -e ${MODULES_SIGN_CERT} && ${MODULES_SIGN_CERT} 
!= ${MODULES_SIGN_KEY} ]]; then
+   MODULES_SIGN_KEY_CONTENTS="$(cat 
"${MODULES_SIGN_CERT}" "${MODULES_SIGN_KEY}" || die)"
+   else
+   MODULES_SIGN_KEY_CONTENTS="$(< 
"${MODULES_SIGN_KEY}")"
+   fi
+   fi
fi
 }
 
@@ -422,12 +429,11 @@ kernel-build_merge_configs() {
CONFIG_MODULE_SIG_FORCE=y
CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}=y
EOF
-   if [[ -e ${MODULES_SIGN_KEY} && -e ${MODULES_SIGN_CERT} 
&&
-   ${MODULES_SIGN_KEY} != ${MODULES_SIGN_CERT} &&
-   ${MODULES_SIGN_KEY} != pkcs11:* ]]
-   then
-   cat "${MODULES_SIGN_CERT}" 
"${MODULES_SIGN_KEY}" > "${T}/kernel_key.pem" || die
-   MODULES_SIGN_KEY="${T}/kernel_key.pem"
+   if [[ -n ${MODULES_SIGN_KEY_CONTENTS} ]]; then
+   (umask 066 && touch "${T}/kernel_key.pem" || 
die)
+   echo "${MODULES_SIGN_KEY_CONTENTS}" > 
"${T}/kernel_key.pem" || die
+   unset MODULES_SIGN_KEY_CONTENTS
+   export MODULES_SIGN_KEY="${T}/kernel_key.pem"
fi
if [[ ${MODULES_SIGN_KEY} == pkcs11:* || -r 
${MODULES_SIGN_KEY} ]]; then
echo 
"CONFIG_MODULE_SIG_KEY=\"${MODULES_SIGN_KEY}\"" \



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-11 Thread Andrew Ammerlaan
commit: 85eb36a4316ea1b462f0dc855a42f3bf5287b821
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Mon Dec 11 07:36:58 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Mon Dec 11 12:39:34 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85eb36a4

kernel-install.eclass: fix test phase on systemd systems

On systemd systems the dracut systemd modules are included automatically.
Systemd insists our dummy root has some valid /etc/os-release file, otherwise
it refuses the switch root operation. However, with this fix it still does not
boot up correctly on systemd systems, it gets stuck in an infinite boot loop.
Presumably the reason has something to do with our dummy root not having a real
systemd init to switch root to. We add the systemd dracut modules to the omit
list to prevent the problem and ensure the test phase behaves the same on
systemd and non-systemd systems.

Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/kernel-install.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index b4d84f3986c0..22d8ce200016 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -231,6 +231,8 @@ kernel-install_create_qemu_image() {
# some layout needed to pass dracut's usable_root() validation
mkdir -p "${imageroot}"/{bin,dev,etc,lib,proc,root,sbin,sys} || die
touch "${imageroot}/lib/ld-fake.so" || die
+   # Initrd images with systemd require some os-release file
+   cp "${BROOT}/etc/os-release" "${imageroot}/etc/os-release" || die
 
kernel-install_create_init "${imageroot}/sbin/init"
 
@@ -263,6 +265,7 @@ kernel-install_test() {
plymouth # hangs, or sometimes steals output
rngd # hangs or segfaults sometimes
i18n # copies all the fonts from /usr/share/consolefonts
+   dracut-systemd systemd systemd-initrd # gets stuck in boot loop
)
 
# NB: if you pass a path that does not exist or is not a regular



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-10 Thread Ulrich Müller
commit: 56fd1f5766ac3a92bde9800b4c1875d154a67428
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 10 14:56:18 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Dec 11 07:30:54 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56fd1f57

vdr-plugin-2.eclass: Drop support for EAPI 6

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/vdr-plugin-2.eclass | 20 +---
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index 25df4f124434..f53e2c23f4f8 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -9,7 +9,7 @@
 # Joerg Bornkessel 
 # Christian Ruppert 
 # (undisclosed contributors)
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: common vdr plugin ebuild functions
 # @DESCRIPTION:
 # Eclass for easing maintenance of vdr plugin ebuilds
@@ -61,14 +61,13 @@
 # @CODE
 
 case ${EAPI} in
-   6|7|8) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
 if [[ -z ${_VDR_PLUGIN_2_ECLASS} ]]; then
 _VDR_PLUGIN_2_ECLASS=1
 
-[[ ${EAPI} == 6 ]] && inherit eutils
 inherit flag-o-matic strip-linguas toolchain-funcs unpacker
 
 # Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and 
postfixes
@@ -82,18 +81,9 @@ DESCRIPTION="vdr Plugin: ${VDRPLUGIN} (based on 
vdr-plugin-2.eclass)"
 S="${WORKDIR}/${VDRPLUGIN}-${PV}"
 
 # depend on headers for DVB-driver and vdr-scripts
-case ${EAPI} in
-   6)
-   DEPEND="media-tv/gentoo-vdr-scripts
-   virtual/linuxtv-dvb-headers
-   virtual/pkgconfig"
-   ;;
-   *)
-   BDEPEND="virtual/pkgconfig"
-   DEPEND="media-tv/gentoo-vdr-scripts
-   virtual/linuxtv-dvb-headers"
-   ;;
-esac
+BDEPEND="virtual/pkgconfig"
+DEPEND="media-tv/gentoo-vdr-scripts
+   virtual/linuxtv-dvb-headers"
 RDEPEND="media-tv/gentoo-vdr-scripts
app-eselect/eselect-vdr"
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-10 Thread Ulrich Müller
commit: a4008c25b3189ab153ce8d0a4a9b381911fdb491
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 10 14:56:30 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Dec 11 07:30:55 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4008c25

haskell-cabal.eclass: Drop support for EAPI 6

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/haskell-cabal.eclass | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index a3e2da6155f3..4ae554d22fe8 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -7,7 +7,7 @@
 # @AUTHOR:
 # Original author: Andres Loeh 
 # Original author: Duncan Coutts 
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: for packages that make use of the Haskell Common Architecture for 
Building Applications and Libraries (cabal)
 # @DESCRIPTION:
 # Basic instructions:
@@ -41,9 +41,7 @@
 #  is fixed.
 
 case ${EAPI} in
-   # eutils is for eqawarn
-   6) inherit eutils ;;
-   8|7) ;;
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -99,7 +97,6 @@ EXPORT_FUNCTIONS pkg_setup src_prepare src_configure 
src_compile src_test src_in
 #CABAL_EXTRA_HSCOLOUR_FLAGS="--executables --tests"
 : "${CABAL_EXTRA_HSCOLOUR_FLAGS:=}"
 
-
 # @ECLASS_VARIABLE: CABAL_EXTRA_TEST_FLAGS
 # @USER_VARIABLE
 # @DESCRIPTION:
@@ -157,7 +154,7 @@ S="${WORKDIR}/${CABAL_P}"
 # @DESCRIPTION:
 # The location of the .cabal file for the Haskell package. This defaults to
 # "${S}/${CABAL_PN}.cabal".
-# 
+#
 # NOTE: If $S is redefined in the ebuild after inheriting this eclass,
 # $CABAL_FILE will also need to be redefined as well.
 : "${CABAL_FILE:="${S}/${CABAL_PN}.cabal"}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-10 Thread Ulrich Müller
commit: 068f035ebd38bb1ba7eecba4f7cfc30b77aa0f84
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 10 14:56:35 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Dec 11 07:30:55 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=068f035e

ghc-package.eclass: Drop support for EAPI 6

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/ghc-package.eclass | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass
index 66a14ca971ba..48936a894d7f 100644
--- a/eclass/ghc-package.eclass
+++ b/eclass/ghc-package.eclass
@@ -6,7 +6,7 @@
 # "Gentoo's Haskell Language team" 
 # @AUTHOR:
 # Original Author: Andres Loeh 
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
 # @BLURB: This eclass helps with the Glasgow Haskell Compiler's package 
configuration utility.
 # @DESCRIPTION:
 # Helper eclass to handle ghc installation/upgrade/deinstallation process.
@@ -16,7 +16,6 @@ inherit multiprocessing
 # Maintain version-testing compatibility with ebuilds not using EAPI 7.
 case ${EAPI} in
7|8) ;;
-   6) inherit eapi7-ver ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-10 Thread Ulrich Müller
commit: 923de456a3893380151dde2383805d746651d589
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 10 15:19:51 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Dec 11 07:30:57 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=923de456

ghc-package.eclass: Fix typos

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/ghc-package.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass
index 48936a894d7f..1d9483e012fb 100644
--- a/eclass/ghc-package.eclass
+++ b/eclass/ghc-package.eclass
@@ -23,7 +23,7 @@ esac
 # QA check generates false positive because it assumes
 # presence of GCC-specific sections.
 #
-# Workaround false positiove by disabling the check completely.
+# Workaround false positive by disabling the check completely.
 # bug #722078, bug #677600
 QA_FLAGS_IGNORED='.*'
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-10 Thread Ulrich Müller
commit: 8824bbbcb8a264e75a5e9bd812e62a3f973f0385
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sun Dec 10 15:19:45 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Mon Dec 11 07:30:56 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8824bbbc

haskell-cabal.eclass: Fix typos

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/haskell-cabal.eclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 4ae554d22fe8..7895d9256eba 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -35,7 +35,7 @@
 #  package it might cause cause the test-suite to fail with
 #  errors like:
 #  > : cannot satisfy -package-id 
singletons-2.7-3Z7pnljD8tU1NrslJodXmr
-#  Workaround re-reginsters the package to avoid the failure
+#  Workaround re-registers the package to avoid the failure
 #  (and rebuilds changes).
 #  FEATURE can be removed once 
https://github.com/haskell/cabal/issues/7213
 #  is fixed.
@@ -760,7 +760,7 @@ cabal_src_compile() {
fi
if [[ -n "${CABAL_REBUILD_AFTER_DOC_WORKAROUND}" ]]; then
ewarn "rebuild-after-doc-workaround is enabled. This is 
a"
-   ewarn "temporary worakround to deal with 
https://github.com/haskell/cabal/issues/7213;
+   ewarn "temporary workaround to deal with 
https://github.com/haskell/cabal/issues/7213;
ewarn "until the upstream issue can be resolved."
cabal-build
fi
@@ -1101,7 +1101,7 @@ cabal-register-inplace() {
 # needed by the executable. (Needed libraries are automatically added to
 # LD_LIBRARY_PATH by haskell-cabal_src_compile().)
 #
-# This is only inteded to be run in the test and install phases.
+# This is only intended to be run in the test and install phases.
 cabal-run-dist-bin() {
einfo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}"
case "$EBUILD_PHASE_FUNC" in



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-09 Thread Michał Górny
commit: e759d3dcff09e271735620b525333d091e085e2d
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Dec  2 12:35:51 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec  9 18:16:16 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e759d3dc

cargo.eclass: Allow CRATES to be unset

Remove the assertion requiring CRATES to be set for non-live ebuilds.
There are valid use cases for ebuilds without CRATES, and the eclass
works just fine -- e.g. when the package is using GIT_CRATES only,
or when crates are provided via a tarball.

Closes: https://github.com/gentoo/gentoo/pull/34091
Signed-off-by: Michał Górny  gentoo.org>

 eclass/cargo.eclass | 5 -
 1 file changed, 5 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 70b6008d9cd8..1e1a6e3ddfe2 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -35,11 +35,6 @@ case ${EAPI} in
# 1.52 may need setting RUSTC_BOOTSTRAP envvar for some crates
# 1.53 added cargo update --offline, can be used to update 
vulnerable crates from pre-fetched registry without editing toml
RUST_DEPEND=">=virtual/rust-1.53"
-
-   if [[ -z ${CRATES} && "${PV}" != ** ]]; then
-   eerror "undefined CRATES variable in non-live EAPI=8 
ebuild"
-   die "CRATES variable not defined"
-   fi
;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-09 Thread Michał Górny
commit: 72d1d753394958d52f25ea412fe75bb0282844d9
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Dec  9 10:21:39 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Dec  9 10:31:47 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72d1d753

kernel-build.eclass: Do not call dtbs_install in src_test()

Do not call `emake dtbs_install` in `src_test()` phase, as it attempts
to install straight to `/boot`.  Why do people send patches without
actually testing them?!

Signed-off-by: Michał Górny  gentoo.org>

 eclass/kernel-build.eclass | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 4f7e4d047739..f5529c319f9f 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -218,11 +218,6 @@ kernel-build_src_compile() {
 # from kernel-install.eclass with the correct paths.
 kernel-build_src_test() {
debug-print-function ${FUNCNAME} "${@}"
-   local targets=( modules_install )
-   # on arm or arm64 you also need dtb
-   if use arm || use arm64 || use riscv; then
-   targets+=( dtbs_install )
-   fi
 
# Use the kernel build system to strip, this ensures the modules
# are stripped *before* they are signed or compressed.
@@ -233,7 +228,7 @@ kernel-build_src_test() {
 
emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \
INSTALL_MOD_PATH="${T}" INSTALL_MOD_STRIP="${strip_args}" \
-   "${targets[@]}"
+   modules_install
 
local dir_ver=${PV}${KV_LOCALVERSION}
local relfile=${WORKDIR}/build/include/config/kernel.release



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-09 Thread Ulrich Müller
commit: af69bc3ed32a185a3d3485018b2d4b11a571fed7
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Dec  9 08:29:20 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec  9 10:01:29 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af69bc3e

java-pkg-opt-2.eclass: Drop redundant EAPI conditional

Use standard EAPI guard.

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/java-pkg-opt-2.eclass | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/eclass/java-pkg-opt-2.eclass b/eclass/java-pkg-opt-2.eclass
index 0caba1d40e07..7b3e79749fb6 100644
--- a/eclass/java-pkg-opt-2.eclass
+++ b/eclass/java-pkg-opt-2.eclass
@@ -13,8 +13,8 @@
 # Inherit this eclass instead of java-pkg-2 if you only need optional Java
 # support.
 
-case ${EAPI:-0} in
-   [78]) ;;
+case ${EAPI} in
+   7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
@@ -49,9 +49,7 @@ java-pkg-opt-2_pkg_setup() {
 
 java-pkg-opt-2_src_prepare() {
use ${JAVA_PKG_OPT_USE} && java-utils-2_src_prepare
-   case "${EAPI:-0}" in
-   [78]) use ${JAVA_PKG_OPT_USE} || eapply_user ;;
-   esac
+   use ${JAVA_PKG_OPT_USE} || eapply_user
 }
 
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-09 Thread Ulrich Müller
commit: b11d535857e9dbb1e0568c02da107cdae1b1078c
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Dec  9 08:28:03 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec  9 10:01:28 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b11d5358

java-ant-2.eclass: Drop redundant EAPI conditional

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/java-ant-2.eclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
index 2513ded70a30..35fe84997563 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -54,8 +54,7 @@ inherit java-utils-2 multilib
 # Setting this variable non-empty before inheriting java-ant-2 disables adding
 # dev-java/ant-core into DEPEND.
 if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
-   JAVA_ANT_E_DEPEND+=" >=dev-java/ant-core-1.8.2"
-   [[ "${EAPI:-0}" != 0 ]] && JAVA_ANT_E_DEPEND+=":0"
+   JAVA_ANT_E_DEPEND+=" >=dev-java/ant-core-1.8.2:0"
 fi
 
 # add ant tasks specified in WANT_ANT_TASKS to DEPEND
@@ -121,7 +120,7 @@ JAVA_ANT_CLASSPATH_TAGS="javac xjavac"
 
 # @FUNCTION: java-ant-2_src_configure
 # @DESCRIPTION:
-# src_configure rewrites the build.xml files automatically, unless EAPI is 
undefined, 0 or 1.
+# src_configure rewrites the build.xml files automatically.
 java-ant-2_src_configure() {
# if java support is optional, don't perform this when the USE flag is 
off
if has java-pkg-opt-2 ${INHERITED}; then



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-09 Thread Ulrich Müller
commit: 0654db51f6cb70a48000a9af771859f42ed54ef8
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Dec  9 08:26:25 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec  9 10:01:27 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0654db51

java-utils-2.eclass: Drop redundant EAPI conditionals

Use standard EAPI guard. Inherit eqawarn instead of eutils in EAPI 6.

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/java-utils-2.eclass | 29 +
 1 file changed, 5 insertions(+), 24 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 129402b256d5..31b8ab8df60a 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -17,17 +17,17 @@
 # that have optional Java support. In addition you can inherit java-ant-2 for
 # Ant-based packages.
 
-case ${EAPI:-0} in
-   [678]) ;;
+case ${EAPI} in
+   6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
 if [[ -z ${_JAVA_UTILS_2_ECLASS} ]] ; then
 _JAVA_UTILS_2_ECLASS=1
 
-# EAPI 7 has version functions built-in. Use eapi7-ver for all earlier 
eclasses.
+# EAPI 7 has version functions built-in. Use eapi7-ver for all earlier EAPIs.
 # Keep versionator inheritance in case consumers are using it implicitly.
-[[ ${EAPI} == 6 ]] && inherit eapi7-ver eutils multilib versionator
+[[ ${EAPI} == 6 ]] && inherit eapi7-ver eqawarn multilib versionator
 
 # Make sure we use java-config-2
 export WANT_JAVA_CONFIG="2"
@@ -1703,16 +1703,6 @@ java-pkg_get-jni-cflags() {
echo ${flags}
 }
 
-java-pkg_ensure-gcj() {
-   # was enforcing sys-devel/gcc[gcj]
-   die "${FUNCNAME} was removed. Use use-deps available as of EAPI 2 
instead. #261562"
-}
-
-java-pkg_ensure-test() {
-   # was enforcing USE=test if FEATURES=test
-   die "${FUNCNAME} was removed. Package mangers handle this already. 
#278965"
-}
-
 # @FUNCTION: java-pkg_register-ant-task
 # @USAGE: [--version x.y] []
 # @DESCRIPTION:
@@ -1942,10 +1932,7 @@ etestng() {
 # src_prepare Searches for bundled jars
 # Don't call directly, but via java-pkg-2_src_prepare!
 java-utils-2_src_prepare() {
-   case ${EAPI:-0} in
-   [678]) eapply_user ;;
-   *) default_src_prepare ;;
-   esac
+   eapply_user
 
# Check for files in JAVA_RM_FILES array.
if [[ ${JAVA_RM_FILES[@]} ]]; then
@@ -1960,12 +1947,6 @@ java-utils-2_src_prepare() {
find "${WORKDIR}" -name "*.class"
echo "Search done."
fi
-
-   # Delete bundled .class and .jar files.
-   case ${EAPI:-0} in
-   [678]) ;;
-   *) java-pkg_clean ;;
-   esac
 }
 
 # @FUNCTION: java-utils-2_pkg_preinst



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-09 Thread Ulrich Müller
commit: b678aa0284bfdaafd452347544b23e6ab654d3af
Author: Ulrich Müller  gentoo  org>
AuthorDate: Sat Dec  9 08:28:33 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Sat Dec  9 10:01:28 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b678aa02

java-pkg-2.eclass: Use standard EAPI guard

Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/java-pkg-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass
index 3a5c846a18e6..c17a9db26b3b 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -13,8 +13,8 @@
 # This eclass should be inherited for pure Java packages, or by packages which
 # need to use Java.
 
-case ${EAPI:-0} in
-   [678]) ;;
+case ${EAPI} in
+   6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-08 Thread Ulrich Müller
commit: ce17f4043d560ace370b224ab37741fd9b5b1b47
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Dec  7 10:50:31 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Dec  8 17:02:54 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce17f404

rpm.eclass: Replace eutils inherit by eqawarn in EAPI 6

Reviewed-by: David Seifert  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 eclass/rpm.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/rpm.eclass b/eclass/rpm.eclass
index d8bb0ad2814d..b9187167eb8f 100644
--- a/eclass/rpm.eclass
+++ b/eclass/rpm.eclass
@@ -8,7 +8,7 @@
 # @BLURB: convenience class for extracting RPMs
 
 case ${EAPI} in
-   6) inherit epatch eutils ;; # eutils for eqawarn
+   6) inherit epatch eqawarn ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-08 Thread Ulrich Müller
commit: be94f85920abf3720c2978cba2bdbfb4c1bcf7bd
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Dec  7 10:50:03 2023 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Dec  8 17:02:53 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be94f859

flag-o-matic.eclass: Replace eutils inherit by eqawarn in EAPI 6

Reviewed-by: David Seifert  gentoo.org>
Signed-off-by: Ulrich Müller  gentoo.org>

 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 d377568327e6..40662f4f7d7b 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -20,7 +20,7 @@ _FLAG_O_MATIC_ECLASS=1
 
 inherit toolchain-funcs
 
-[[ ${EAPI} == 6 ]] && inherit eutils
+[[ ${EAPI} == 6 ]] && inherit eqawarn
 
 # @FUNCTION: all-flag-vars
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-05 Thread Andrew Ammerlaan
commit: db0195c3d66fc9ca1ee966b2177b2174a7d7bd02
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Wed Nov  8 13:46:19 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Tue Dec  5 10:27:41 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db0195c3

eclass/(dist-)kernel{-utils,-install}: More flexible initrd generation

We only need to call dracut to generate an initrd/uki if we are using
<=sys-kernel/installkernel-gentoo-7. sys-kernel/installkernel-systemd
already calls dracut via its plugin system if it is installed.
sys-kernel/installkernel-gentoo-8[dracut] now also contains the code
required to generate an initrd or uki.

This change makes it possible for users to use other/custom initrd
generators with our dist kernels if they are using installkernel-systemd.

Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/dist-kernel-utils.eclass | 50 -
 eclass/kernel-install.eclass| 30 ++---
 2 files changed, 52 insertions(+), 28 deletions(-)

diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 76a2f8d48cdf..62750d1721a2 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -116,21 +116,23 @@ dist-kernel_install_kernel() {
local image=${2}
local map=${3}
 
-   # if dracut is used in uefi=yes mode, initrd will actually
-   # be a combined kernel+initramfs UEFI executable.  we can easily
-   # recognize it by PE magic (vs cpio for a regular initramfs)
-   local initrd=${image%/*}/initrd
-   local magic
-   [[ -s ${initrd} ]] && read -n 2 magic < "${initrd}"
-   if [[ ${magic} == MZ ]]; then
-   einfo "Combined UEFI kernel+initramfs executable found"
-   # install the combined executable in place of kernel
-   image=${initrd%/*}/uki.efi
-   mv "${initrd}" "${image}" || die
-
-   if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
-   # Ensure the uki is signed if dracut hasn't already 
done so.
-   secureboot_sign_efi_file "${image}"
+   if has_version "<=sys-kernel/installkernel-gentoo-7"; then
+   # if dracut is used in uefi=yes mode, initrd will actually
+   # be a combined kernel+initramfs UEFI executable.  we can easily
+   # recognize it by PE magic (vs cpio for a regular initramfs)
+   local initrd=${image%/*}/initrd
+   local magic
+   [[ -s ${initrd} ]] && read -n 2 magic < "${initrd}"
+   if [[ ${magic} == MZ ]]; then
+   einfo "Combined UEFI kernel+initramfs executable found"
+   # install the combined executable in place of kernel
+   image=${initrd%/*}/uki.efi
+   mv "${initrd}" "${image}" || die
+
+   if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
+   # Ensure the uki is signed if dracut hasn't 
already done so.
+   secureboot_sign_efi_file "${image}"
+   fi
fi
fi
 
@@ -150,6 +152,10 @@ dist-kernel_install_kernel() {
 # The function will determine whether  is actually
 # a dist-kernel, and whether initramfs was used.
 #
+# With sys-kernel/installkernel-systemd, or version 8 or greater of
+# sys-kernel/installkernel-gentoo, the generation of the initrd via dracut
+# is handled by kernel-install instead.
+#
 # This function is to be used in pkg_postinst() of ebuilds installing
 # kernel modules that are included in the initramfs.
 dist-kernel_reinstall_initramfs() {
@@ -160,19 +166,23 @@ dist-kernel_reinstall_initramfs() {
local ver=${2}
 
local image_path=${kernel_dir}/$(dist-kernel_get_image_path)
-   local initramfs_path=${image_path%/*}/initrd
if [[ ! -f ${image_path} ]]; then
eerror "Kernel install missing, image not found:"
eerror "  ${image_path}"
eerror "Initramfs will not be updated.  Please reinstall your 
kernel."
return
fi
-   if [[ ! -f ${initramfs_path} && ! -f ${initramfs_path%/*}/uki.efi ]]; 
then
-   einfo "No initramfs or uki found at ${image_path}"
-   return
+
+   if has_version "<=sys-kernel/installkernel-gentoo-7"; then
+   local initramfs_path=${image_path%/*}/initrd
+   if [[ ! -f ${initramfs_path} && ! -f 
${initramfs_path%/*}/uki.efi ]]; then
+   einfo "No initramfs or uki found at ${image_path}"
+   return
+   fi
+
+   dist-kernel_build_initramfs "${initramfs_path}" "${ver}"
fi
 
-   dist-kernel_build_initramfs "${initramfs_path}" "${ver}"
dist-kernel_install_kernel "${ver}" "${image_path}" \
"${kernel_dir}/System.map"
 }

diff --git 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-12-03 Thread Sam James
commit: 5fe21d4ec04889a3019dea71ffd69b31825dc394
Author: Sam James  gentoo  org>
AuthorDate: Mon Dec  4 07:12:36 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Dec  4 07:32:13 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fe21d4e

vala.eclass: adapt modern c workaround for gcc

GCC doesn't have -Wincompatible-function-pointer-types, just 
-Wincompatible-pointer-types,
and it makes the latter fatal in GCC 14.

Just adapt the workaround to use that for now until Vala is fixed properly 
upstream.

Bug: https://bugs.gentoo.org/892708
Signed-off-by: Sam James  gentoo.org>

 eclass/vala.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index d02cc246977a..be5fac99a767 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -174,7 +174,7 @@ vala_setup() {
 
# See bug #892708.
# Workaround for https://gitlab.gnome.org/GNOME/vala/-/issues/1408.
-   append-cflags $(test-flags-CC -Wno-incompatible-function-pointer-types)
+   append-cflags $(test-flags-CC -Wno-incompatible-pointer-types)
 }
 
 # @FUNCTION: vala_src_prepare



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-29 Thread Michał Górny
commit: e391801cd344ae303789d860ee5d0926f7a1e45d
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Nov 29 12:47:22 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Nov 29 15:13:55 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e391801c

llvm.org.eclass: Add 18.0.0_pre20231129 snapshot

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 9f702697a846..a92308e38106 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
 
case ${PV} in
+   18.0.0_pre20231129)
+   
EGIT_COMMIT=6a4489a73337907d52e7eaf3716f3de9008e6e53
+   ;;
18.0.0_pre20231119)

EGIT_COMMIT=5237193b87721134541f228e28edfd544a9c8ac8
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-27 Thread Sam James
commit: 1186dced6c900242bfa70151030fd3463eb20717
Author: Sam James  gentoo  org>
AuthorDate: Mon Nov 27 01:33:34 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Nov 27 11:12:55 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1186dced

meson.eclass: update machine files for meson-1.3.0 deprecation

See 
https://mesonbuild.com/Release-notes-for-1-3-0.html#machine-files-pkgconfig-field-deprecated-and-replaced-by-pkgconfig.

'pkgconfig' is deprecated as a key in machine files in favour of 'pkg-config'.

We can define both 'pkgconfig' and 'pkg-config' in our generated machine files
until we require >=1.3.0. Per the release notes, if we define both, no 
deprecation
notice is emitted, so do that.

Reviewed-by: Eli Schwartz  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 eclass/meson.eclass | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index c33f4ea208a7..f7cf8a0722ba 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -161,7 +161,10 @@ _meson_create_cross_file() {
objc = $(_meson_env_array "$(tc-getPROG OBJC cc)")
objcopy = $(_meson_env_array "$(tc-getOBJCOPY)")
objcpp = $(_meson_env_array "$(tc-getPROG OBJCXX c++)")
+   # TODO: Cleanup 'pkgconfig' and keep just 'pkg-config' once we require
+   # >=1.3.0.
pkgconfig = '$(tc-getPKG_CONFIG)'
+   pkg-config = '$(tc-getPKG_CONFIG)'
strip = $(_meson_env_array "$(tc-getSTRIP)")
windres = $(_meson_env_array "$(tc-getRC)")
 
@@ -215,7 +218,10 @@ _meson_create_native_file() {
objc = $(_meson_env_array "$(tc-getBUILD_PROG OBJC cc)")
objcopy = $(_meson_env_array "$(tc-getBUILD_OBJCOPY)")
objcpp = $(_meson_env_array "$(tc-getBUILD_PROG OBJCXX c++)")
+   # TODO: Cleanup 'pkgconfig' and keep just 'pkg-config' once we require
+   # >=1.3.0.
pkgconfig = '$(tc-getBUILD_PKG_CONFIG)'
+   pkg-config = '$(tc-getBUILD_PKG_CONFIG)'
strip = $(_meson_env_array "$(tc-getBUILD_STRIP)")
windres = $(_meson_env_array "$(tc-getBUILD_PROG RC windres)")
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-26 Thread Andrew Ammerlaan
commit: 9f509fcc88e163559bcfd0787595189d4c2f6c0c
Author: Andrew Ammerlaan  gentoo  org>
AuthorDate: Sun Nov 26 18:48:46 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sun Nov 26 18:50:37 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f509fcc

Revert "kernel-build.eclass: copy module signing key to tempdir in pkg_setup"

reverted at mgorny's request, apparently we can't hardcode the portage user.

This reverts commit d03c14cd4be8665830082f424e4443906b005c7e.

Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/kernel-build.eclass | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 6f18bc1dc969..4f7e4d047739 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -114,16 +114,6 @@ kernel-build_pkg_setup() {
python-any-r1_pkg_setup
if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then
secureboot_pkg_setup
-   if [[ -e ${MODULES_SIGN_KEY} && ${MODULES_SIGN_KEY} != pkcs11:* 
]]; then
-   if [[ -e ${MODULES_SIGN_CERT} && ${MODULES_SIGN_CERT} 
!= ${MODULES_SIGN_KEY} ]]; then
-   cat "${MODULES_SIGN_CERT}" 
"${MODULES_SIGN_KEY}" > "${T}/kernel_key.pem" || die
-   else
-   cp "${MODULES_SIGN_KEY}" "${T}/kernel_key.pem" 
|| die
-   fi
-   chown portage:portage "${T}/kernel_key.pem" || die
-   chmod 0400 "${T}/kernel_key.pem" || die
-   export MODULES_SIGN_KEY="${T}/kernel_key.pem"
-   fi
fi
 }
 
@@ -437,6 +427,13 @@ kernel-build_merge_configs() {
CONFIG_MODULE_SIG_FORCE=y
CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}=y
EOF
+   if [[ -e ${MODULES_SIGN_KEY} && -e ${MODULES_SIGN_CERT} 
&&
+   ${MODULES_SIGN_KEY} != ${MODULES_SIGN_CERT} &&
+   ${MODULES_SIGN_KEY} != pkcs11:* ]]
+   then
+   cat "${MODULES_SIGN_CERT}" 
"${MODULES_SIGN_KEY}" > "${T}/kernel_key.pem" || die
+   MODULES_SIGN_KEY="${T}/kernel_key.pem"
+   fi
if [[ ${MODULES_SIGN_KEY} == pkcs11:* || -r 
${MODULES_SIGN_KEY} ]]; then
echo 
"CONFIG_MODULE_SIG_KEY=\"${MODULES_SIGN_KEY}\"" \
>> "${WORKDIR}/modules-sign.config"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-26 Thread Sam James
commit: b1a0b09303cb2f1e8001591199cd08f07dcc610f
Author: Sam James  gentoo  org>
AuthorDate: Sun Nov 26 18:29:14 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Nov 26 18:30:01 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1a0b093

aspell-dict-r1.eclass: drop usage of which

The configure script uses are all the same. Go for a sed instead of many patches
for all of aspell-*.

Bug: https://bugs.gentoo.org/844094
Signed-off-by: Sam James  gentoo.org>

 eclass/aspell-dict-r1.eclass | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/eclass/aspell-dict-r1.eclass b/eclass/aspell-dict-r1.eclass
index 170edb4cacde..1a3bd0b21b24 100644
--- a/eclass/aspell-dict-r1.eclass
+++ b/eclass/aspell-dict-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: aspell-dict-r1.eclass
@@ -58,7 +58,6 @@ SLOT="0"
 
 RDEPEND="app-text/aspell"
 DEPEND="${RDEPEND}"
-BDEPEND="sys-apps/which"
 
 _ASPELL_MAJOR_VERSION=${ASPELL_VERSION:-6}
 [[ ${_ASPELL_MAJOR_VERSION} != [56] ]] && die "Unsupported 
ASPELL_VERSION=${ASPELL_VERSION}"
@@ -68,6 +67,10 @@ unset _ASPELL_MAJOR_VERSION
 # @DESCRIPTION:
 # The aspell-dict-r1 src_configure function which is exported.
 aspell-dict-r1_src_configure() {
+   # configure generates lines like:
+   #  `echo "ASPELL = `which $ASPELL`" > Makefile`
+   sed -i -e '/.* = `which/ s:`which:`command -v:' configure || die
+
# Since it's a non-autoconf based script, 'econf' cannot be used.
./configure || die
 }



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-26 Thread Andrew Ammerlaan
commit: d03c14cd4be8665830082f424e4443906b005c7e
Author: Violet Purcell  inventati  org>
AuthorDate: Thu Nov 16 17:23:16 2023 +
Commit: Andrew Ammerlaan  gentoo  org>
CommitDate: Sun Nov 26 08:06:24 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d03c14cd

kernel-build.eclass: copy module signing key to tempdir in pkg_setup

Previously, it was being copied in src_prepare, and thus would fail if
the signing key was not readable by portage:portage. This commit makes
kernel-build.eclass instead copy the signing key in pkg_setup, and then
correct the permissions.

Signed-off-by: Violet Purcell  inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/33850
Signed-off-by: Andrew Ammerlaan  gentoo.org>

 eclass/kernel-build.eclass | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 4f7e4d047739..6f18bc1dc969 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -114,6 +114,16 @@ kernel-build_pkg_setup() {
python-any-r1_pkg_setup
if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then
secureboot_pkg_setup
+   if [[ -e ${MODULES_SIGN_KEY} && ${MODULES_SIGN_KEY} != pkcs11:* 
]]; then
+   if [[ -e ${MODULES_SIGN_CERT} && ${MODULES_SIGN_CERT} 
!= ${MODULES_SIGN_KEY} ]]; then
+   cat "${MODULES_SIGN_CERT}" 
"${MODULES_SIGN_KEY}" > "${T}/kernel_key.pem" || die
+   else
+   cp "${MODULES_SIGN_KEY}" "${T}/kernel_key.pem" 
|| die
+   fi
+   chown portage:portage "${T}/kernel_key.pem" || die
+   chmod 0400 "${T}/kernel_key.pem" || die
+   export MODULES_SIGN_KEY="${T}/kernel_key.pem"
+   fi
fi
 }
 
@@ -427,13 +437,6 @@ kernel-build_merge_configs() {
CONFIG_MODULE_SIG_FORCE=y
CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}=y
EOF
-   if [[ -e ${MODULES_SIGN_KEY} && -e ${MODULES_SIGN_CERT} 
&&
-   ${MODULES_SIGN_KEY} != ${MODULES_SIGN_CERT} &&
-   ${MODULES_SIGN_KEY} != pkcs11:* ]]
-   then
-   cat "${MODULES_SIGN_CERT}" 
"${MODULES_SIGN_KEY}" > "${T}/kernel_key.pem" || die
-   MODULES_SIGN_KEY="${T}/kernel_key.pem"
-   fi
if [[ ${MODULES_SIGN_KEY} == pkcs11:* || -r 
${MODULES_SIGN_KEY} ]]; then
echo 
"CONFIG_MODULE_SIG_KEY=\"${MODULES_SIGN_KEY}\"" \
>> "${WORKDIR}/modules-sign.config"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-25 Thread Andreas Sturmlechner
commit: cbe4689429d7ad1e6e28d24faafab9ec5ade7b4f
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Wed Nov 15 21:04:07 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Nov 25 23:33:25 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbe46894

ecm.eclass: Relax kde-frameworks/extra-cmake-modules SLOT dep to :*

We do not need to pin to 0 right away to let overlays catch up.

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/ecm.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index b58a38be027f..3c102d669caf 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -276,7 +276,7 @@ esac
 
 BDEPEND+="
dev-libs/libpcre2:*
-   >=kde-frameworks/extra-cmake-modules-${KFMIN}:${KFSLOT}
+   >=kde-frameworks/extra-cmake-modules-${KFMIN}:*
 "
 RDEPEND+=" >=kde-frameworks/kf-env-4"
 if [[ ${_KFSLOT} == 6 ]]; then



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-25 Thread Andreas Sturmlechner
commit: ca48f7c92ccdddb4d65e094d5e8e19102e3413f3
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Nov 19 12:28:03 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Nov 25 23:33:24 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca48f7c9

ecm.eclass: Use _KFSLOT to aptly configure KF5/KF6 based packages

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/ecm.eclass | 46 +-
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 46cc53afd5cb..b58a38be027f 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -87,26 +87,27 @@ fi
 # Will accept "true", "false", "optional", "forceoptional". If set to "false",
 # do nothing.
 # Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and let
-# KF5DocTools generate and install the handbook from docbook file(s) found in
-# ECM_HANDBOOK_DIR. However if !handbook, disable build of ECM_HANDBOOK_DIR
-# in CMakeLists.txt.
-# If set to "optional", build with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
-# when !handbook. In case package requires KF5KDELibs4Support, see next:
-# If set to "forceoptional", remove a KF5DocTools dependency from the root
-# CMakeLists.txt in addition to the above.
+# KF${_KFSLOT}DocTools generate and install the handbook from docbook file(s)
+# found in ECM_HANDBOOK_DIR. However if !handbook, disable build of
+# ECM_HANDBOOK_DIR in CMakeLists.txt.
+# If set to "optional", build with
+# -DCMAKE_DISABLE_FIND_PACKAGE_KF${_KFSLOT}DocTools=ON when !handbook. In case
+# package requires KF5KDELibs4Support, see next:
+# If set to "forceoptional", remove a KF${_KFSLOT}DocTools dependency from the
+# root CMakeLists.txt in addition to the above.
 : "${ECM_HANDBOOK:=false}"
 
 # @ECLASS_VARIABLE: ECM_HANDBOOK_DIR
 # @DESCRIPTION:
 # Specifies the directory containing the docbook file(s) relative to ${S} to
-# be processed by KF5DocTools (kdoctools_install).
+# be processed by KF${_KFSLOT}DocTools (kdoctools_install).
 : "${ECM_HANDBOOK_DIR:=doc}"
 
 # @ECLASS_VARIABLE: ECM_PO_DIRS
 # @DESCRIPTION:
 # Specifies directories of l10n files relative to ${S} to be processed by
-# KF5I18n (ki18n_install). If IUSE nls exists and is disabled then disable
-# build of these directories in CMakeLists.txt.
+# KF${_KFSLOT}I18n (ki18n_install). If IUSE nls exists and is disabled then
+# disable build of these directories in CMakeLists.txt.
 : "${ECM_PO_DIRS:="po poqm"}"
 
 # @ECLASS_VARIABLE: ECM_QTHELP
@@ -128,14 +129,14 @@ fi
 # "forceoptional-recursive".
 # Default value is "false", except for CATEGORY=kde-frameworks where it is
 # set to "true". If set to "false", do nothing.
-# For any other value, add "test" to IUSE and DEPEND on dev-qt/qttest:5.
-# If set to "optional", build with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
-# when USE=!test.
-# If set to "forceoptional", punt Qt5Test dependency and ignore "autotests",
+# For any other value, add "test" to IUSE and DEPEND on dev-qt/qtbase:6[test]
+# (for KF5: dev-qt/qttest:5). If set to "optional", build with
+# -DCMAKE_DISABLE_FIND_PACKAGE_Qt${_KFSLOT}Test=ON when USE=!test. If set
+# to "forceoptional", punt Qt${_KFSLOT}Test dependency and ignore "autotests",
 # "test", "tests" subdirs from top-level CMakeLists.txt when USE=!test.
-# If set to "forceoptional-recursive", punt Qt5Test dependencies and make
-# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in
-# ${S} and below conditional on BUILD_TESTING when USE=!test. This is always
+# If set to "forceoptional-recursive", punt Qt${_KFSLOT}Test dependencies and
+# make autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt
+# in ${S} and below conditional on BUILD_TESTING when USE=!test. This is always
 # meant as a short-term fix and creates ${T}/${P}-tests-optional.patch to
 # refine and submit upstream.
 if [[ ${CATEGORY} = kde-frameworks ]]; then
@@ -158,7 +159,10 @@ fi
 # @ECLASS_VARIABLE: _KFSLOT
 # @INTERNAL
 # @DESCRIPTION:
-# KDE Frameworks and Qt slot dependency, implied by KFMIN version.
+# KDE Frameworks and Qt main slot dependency, implied by KFMIN version, *not*
+# necessarily the package's SLOT. This is being used throughout the eclass to
+# depend on either :5 or :6 Qt/KF packages as well as setting correctly
+# prefixed cmake args.
 : "${_KFSLOT:=5}"
 if [[ ${CATEGORY} == kde-frameworks ]]; then
if [[ ${PV} != 5. ]] && $(ver_test ${KFMIN} -ge 5.240); then
@@ -489,7 +493,7 @@ ecm_src_prepare() {
# always install unconditionally for kconfigwidgets - if you use
# language X as system language, and there is a combobox with 
language
# names, the translated language name for language Y is taken 
from
-   # /usr/share/locale/Y/kf5_entry.desktop
+   # /usr/share/locale/Y/kf${_KFSLOT}_entry.desktop
[[ ${PN} != kconfigwidgets ]] 

[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-25 Thread Andreas Sturmlechner
commit: 5c3bfa331387b445ac36c3fe71ec6c956e9ffe6c
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Dec 11 17:57:31 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Nov 25 23:33:24 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c3bfa33

frameworks.kde.org.eclass: Support KF6, set ECM to SLOT=0

Define SLOT=6 properly for >=5.240, excluding 5.

git master was set to 5.240 for KF6 ports, unstable KF6 releases use
numbers 5.245 and above.

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/frameworks.kde.org.eclass | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/eclass/frameworks.kde.org.eclass b/eclass/frameworks.kde.org.eclass
index af8e7b86f5a2..5d54b736c91b 100644
--- a/eclass/frameworks.kde.org.eclass
+++ b/eclass/frameworks.kde.org.eclass
@@ -35,8 +35,19 @@ inherit kde.org
 
 HOMEPAGE="https://develop.kde.org/products/frameworks/;
 
-SLOT=5/${PV}
-[[ ${KDE_BUILD_TYPE} == release ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2)
+SLOT=6
+if [[ ${PV} == 5. ]] || ver_test ${PV} -lt 5.240; then
+   SLOT=5
+fi
+if [[ ${PN} == extra-cmake-modules ]]; then
+   SLOT=0
+else
+   if [[ ${KDE_BUILD_TYPE} == release ]]; then
+   SLOT=${SLOT}/$(ver_cut 1-2)
+   else
+   SLOT=${SLOT}/
+   fi
+fi
 
 # @ECLASS_VARIABLE: KDE_ORG_SCHEDULE_URI
 # @INTERNAL



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-25 Thread Andreas Sturmlechner
commit: a11feb4b6d5e640375c2f15ecab79b61f1077419
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Thu May 18 20:28:51 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Nov 25 23:33:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a11feb4b

ecm.eclass: Add SLOT=6 dependencies if KFMIN is >=5.240

- Excluding KDE Frameworks 5. from KFMIN>=5.240 check
- Enforce QT_MAJOR_VERSION=6 for packages w/ KFMIN >= 5.240

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/ecm.eclass | 19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 1bf11a946363..46cc53afd5cb 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -148,7 +148,8 @@ fi
 # @DESCRIPTION:
 # Minimum version of Frameworks to require. Default value for kde-frameworks
 # is ${PV} and 5.106.0 baseline for everything else.
-# Version will also be used to differentiate between KF5/Qt5 and KF6/Qt6.
+# If set to >=5.240, KF6/Qt6 is assumed thus SLOT=6 dependencies added and
+# -DQT_MAJOR_VERSION=6 added to cmake args.
 if [[ ${CATEGORY} = kde-frameworks ]]; then
: "${KFMIN:=$(ver_cut 1-2)}"
 fi
@@ -158,8 +159,16 @@ fi
 # @INTERNAL
 # @DESCRIPTION:
 # KDE Frameworks and Qt slot dependency, implied by KFMIN version.
-: ${_KFSLOT:=5}
-[[ ${KFMIN/.*} == 6 ]] && _KFSLOT=6
+: "${_KFSLOT:=5}"
+if [[ ${CATEGORY} == kde-frameworks ]]; then
+   if [[ ${PV} != 5. ]] && $(ver_test ${KFMIN} -ge 5.240); then
+   _KFSLOT=6
+   fi
+else
+   if [[ ${KFMIN/.*} == 6 ]] || $(ver_test ${KFMIN} -ge 5.240); then
+   _KFSLOT=6
+   fi
+fi
 
 case ${ECM_NONGUI} in
true) ;;
@@ -534,6 +543,10 @@ ecm_src_configure() {
 
local cmakeargs
 
+   if [[ ${_KFSLOT} == 6 ]]; then
+   cmakeargs+=( -DQT_MAJOR_VERSION=6 )
+   fi
+
if in_iuse test && ! use test ; then
cmakeargs+=( -DBUILD_TESTING=OFF )
 



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-25 Thread Andreas Sturmlechner
commit: f1bc09d2cf978bf4005f8aede9bda2e6d9699f3d
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Dec 11 18:50:30 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Nov 25 23:27:41 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1bc09d2

ecm.eclass: Initial support for Qt6-based consumers

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/ecm.eclass | 37 ++---
 1 file changed, 26 insertions(+), 11 deletions(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 0331273faae1..1bf11a946363 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -154,11 +154,12 @@ if [[ ${CATEGORY} = kde-frameworks ]]; then
 fi
 : "${KFMIN:=5.106.0}"
 
-# @ECLASS_VARIABLE: KFSLOT
+# @ECLASS_VARIABLE: _KFSLOT
 # @INTERNAL
 # @DESCRIPTION:
 # KDE Frameworks and Qt slot dependency, implied by KFMIN version.
-: "${KFSLOT:=5}"
+: ${_KFSLOT:=5}
+[[ ${KFMIN/.*} == 6 ]] && _KFSLOT=6
 
 case ${ECM_NONGUI} in
true) ;;
@@ -189,7 +190,11 @@ esac
 case ${ECM_DESIGNERPLUGIN} in
true)
IUSE+=" designer"
-   BDEPEND+=" designer? ( dev-qt/designer:${KFSLOT} )"
+   if [[ ${_KFSLOT} == 6 ]]; then
+   BDEPEND+=" designer? ( 
dev-qt/qttools:${_KFSLOT}[designer] )"
+   else
+   BDEPEND+=" designer? ( dev-qt/designer:${_KFSLOT} )"
+   fi
;;
false) ;;
*)
@@ -212,7 +217,7 @@ esac
 case ${ECM_HANDBOOK} in
true|optional|forceoptional)
IUSE+=" +handbook"
-   BDEPEND+=" handbook? ( 
>=kde-frameworks/kdoctools-${KFMIN}:${KFSLOT} )"
+   BDEPEND+=" handbook? ( 
>=kde-frameworks/kdoctools-${KFMIN}:${_KFSLOT} )"
;;
false) ;;
*)
@@ -224,11 +229,13 @@ esac
 case ${ECM_QTHELP} in
true)
IUSE+=" doc"
-   COMMONDEPEND+=" doc? ( dev-qt/qt-docs:${KFSLOT} )"
-   BDEPEND+=" doc? (
-   >=app-doc/doxygen-1.8.13-r1
-   dev-qt/qthelp:${KFSLOT}
-   )"
+   COMMONDEPEND+=" doc? ( dev-qt/qt-docs:${_KFSLOT} )"
+   BDEPEND+=" doc? ( >=app-doc/doxygen-1.8.13-r1 )"
+   if [[ ${_KFSLOT} == 6 ]]; then
+   BDEPEND+=" dev-qt/qttools:${_KFSLOT}[assistant]"
+   else
+   BDEPEND+=" doc? ( dev-qt/qthelp:${_KFSLOT} )"
+   fi
;;
false) ;;
*)
@@ -240,7 +247,11 @@ esac
 case ${ECM_TEST} in
true|optional|forceoptional|forceoptional-recursive)
IUSE+=" test"
-   DEPEND+=" test? ( dev-qt/qttest:${KFSLOT} )"
+   if [[ ${_KFSLOT} == 6 ]]; then
+   DEPEND+=" test? ( dev-qt/qtbase:${_KFSLOT}[test] )"
+   else
+   DEPEND+=" test? ( dev-qt/qttest:${_KFSLOT} )"
+   fi
RESTRICT+=" !test? ( test )"
;;
false) ;;
@@ -255,7 +266,11 @@ BDEPEND+="
>=kde-frameworks/extra-cmake-modules-${KFMIN}:${KFSLOT}
 "
 RDEPEND+=" >=kde-frameworks/kf-env-4"
-COMMONDEPEND+=" dev-qt/qtcore:${KFSLOT}"
+if [[ ${_KFSLOT} == 6 ]]; then
+   COMMONDEPEND+=" dev-qt/qtbase:${_KFSLOT}"
+else
+   COMMONDEPEND+=" dev-qt/qtcore:${_KFSLOT}"
+fi
 
 DEPEND+=" ${COMMONDEPEND}"
 RDEPEND+=" ${COMMONDEPEND}"



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-25 Thread Andreas Sturmlechner
commit: 3c980b4f715ca6f362e2e1c47f2c6cc26fe300f2
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Jan  8 11:11:15 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sat Nov 25 23:33:24 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c980b4f

frameworks.kde.org.eclass: Switch 5. to kf5 branch

See also:
https://mail.kde.org/pipermail/kde-frameworks-devel/2023-January/123124.html

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 eclass/frameworks.kde.org.eclass | 43 
 1 file changed, 26 insertions(+), 17 deletions(-)

diff --git a/eclass/frameworks.kde.org.eclass b/eclass/frameworks.kde.org.eclass
index 5201464a76c8..af8e7b86f5a2 100644
--- a/eclass/frameworks.kde.org.eclass
+++ b/eclass/frameworks.kde.org.eclass
@@ -50,23 +50,32 @@ KDE_ORG_SCHEDULE_URI+="/Frameworks"
 # Helper variable to construct release group specific SRC_URI.
 _KDE_SRC_URI="mirror://kde/"
 
-if [[ ${KDE_BUILD_TYPE} != live && -z ${KDE_ORG_COMMIT} ]]; then
-   _KDE_SRC_URI+="stable/frameworks/$(ver_cut 1-2)/"
-   case ${KDE_ORG_NAME} in
-   kdelibs4support | \
-   kdesignerplugin | \
-   kdewebkit | \
-   khtml | \
-   kjs | \
-   kjsembed | \
-   kmediaplayer | \
-   kross | \
-   kxmlrpcclient)
-   _KDE_SRC_URI+="portingAids/"
-   ;;
-   esac
+case ${KDE_BUILD_TYPE} in
+   live)
+   if [[ ${PV} == 5. ]]; then
+   EGIT_BRANCH="kf5"
+   fi
+   ;;
+   *)
+   if [[ -z ${KDE_ORG_COMMIT} ]]; then
+   _KDE_SRC_URI+="stable/frameworks/$(ver_cut 1-2)/"
+   case ${KDE_ORG_NAME} in
+   kdelibs4support | \
+   kdesignerplugin | \
+   kdewebkit | \
+   khtml | \
+   kjs | \
+   kjsembed | \
+   kmediaplayer | \
+   kross | \
+   kxmlrpcclient)
+   _KDE_SRC_URI+="portingAids/"
+   ;;
+   esac
 
-   SRC_URI="${_KDE_SRC_URI}${KDE_ORG_NAME}-${PV}.tar.xz"
-fi
+   SRC_URI="${_KDE_SRC_URI}${KDE_ORG_NAME}-${PV}.tar.xz"
+   fi
+   ;;
+esac
 
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-25 Thread Michał Górny
commit: f17e0cfb20597df1591656bbe68b8643c1d50813
Author: Michał Górny  gentoo  org>
AuthorDate: Sat Nov 25 11:19:52 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat Nov 25 11:21:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f17e0cfb

llvm.org.eclass: Remove old snapshots

Signed-off-by: Michał Górny  gentoo.org>

 eclass/llvm.org.eclass | 6 --
 1 file changed, 6 deletions(-)

diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index ad6c35848bc4..9f702697a846 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -75,12 +75,6 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
18.0.0_pre20231119)

EGIT_COMMIT=5237193b87721134541f228e28edfd544a9c8ac8
;;
-   18.0.0_pre2023)
-   
EGIT_COMMIT=167b598648dfcee2f23426bfa972e53f8ac16722
-   ;;
-   18.0.0_pre20231104)
-   
EGIT_COMMIT=83888a5404d46667647fe36d6fa510d075ed57ea
-   ;;
*)
die "Unknown snapshot: ${PV}"
;;



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-24 Thread Sam James
commit: 6a3a1e6a613329f2a4ea88a2fffee0134da780e9
Author: Sam James  gentoo  org>
AuthorDate: Fri Nov 24 17:22:58 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Nov 24 17:44:36 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a3a1e6a

go-env.eclass: Reapply "also set GOARM & GO386 when applicable"

This reverts commit 5718f8440197298e0aa1df2a88a66057d2cdaf83.

Reverted because of the issue mentioned in 
5718f8440197298e0aa1df2a88a66057d2cdaf83
to not leave things broken while investigating a fix.

Reapplying and fixing it up in a followup.

Signed-off-by: Sam James  gentoo.org>

 eclass/go-env.eclass | 21 +
 1 file changed, 21 insertions(+)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index 08e3cf498a70..4bc8c4b15c65 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -19,6 +19,8 @@ inherit toolchain-funcs
 # @FUNCTION: go-env_set_compile_environment
 # @DESCRIPTION:
 # Set up basic compile environment: CC, CXX, and GOARCH.
+# Necessary platform-specific settings such as GOARM or GO386 are also set
+# according to the Portage configuration when building for those architectures.
 # Also carry over CFLAGS, LDFLAGS and friends.
 # Required for cross-compiling with crossdev.
 # If not set, host defaults will be used and the resulting binaries are host 
arch.
@@ -28,6 +30,9 @@ go-env_set_compile_environment() {
tc-export CC CXX
 
export GOARCH="$(go-env_goarch)"
+   use arm && export GOARM=$(go-env_goarm)
+   use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
+
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"
export CGO_CXXFLAGS="${CGO_CXXFLAGS:-$CXXFLAGS}"
@@ -57,4 +62,20 @@ go-env_goarch() {
esac
 }
 
+# @FUNCTION: go-env_goarm
+# @USAGE: [CHOST-value]
+# @DESCRIPTION:
+# Returns the appropriate GOARM setting for the CHOST given, or the default
+# CHOST.
+go-env_goarm() {
+   case "${1:-${CHOST}}" in
+   armv5*) echo 5;;
+   armv6*) echo 6;;
+   armv7*) echo 7;;
+   *)
+   die "unknown GOARM for ${1:-${CHOST}}"
+   ;;
+   esac
+}
+
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-24 Thread Sam James
commit: 6f6e58bd266a7e82f2eff29703a5a819b20ce8f7
Author: Sam James  gentoo  org>
AuthorDate: Fri Nov 24 17:42:25 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Nov 24 18:35:04 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f6e58bd

go-env.eclass: fix GO386 handling

Go 1.16 dropped explicit support for 386 FP and relies on software
emulation instead in the absence of SSE2.

* First, check if cpu_flags_x86_sse2 is used in the ebuild. If it is and it's
enabled, then act in SSE2 mode.

* If not, fall back to checking whether the compiler has __SSE2__ defined via
e.g. -march in CFLAGS.

* Failing that, use softfloat mode.

Fixes the issue mentioned in 5718f8440197298e0aa1df2a88a66057d2cdaf83 (where
we tried to use a USE flag which isn't implicit).

Signed-off-by: Sam James  gentoo.org>

 eclass/go-env.eclass | 23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index 4bc8c4b15c65..1f950db06930 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -31,7 +31,7 @@ go-env_set_compile_environment() {
 
export GOARCH="$(go-env_goarch)"
use arm && export GOARM=$(go-env_goarm)
-   use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
+   use x86 && export GO386=$(go-env_go386)
 
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"
@@ -62,6 +62,27 @@ go-env_goarch() {
esac
 }
 
+# @FUNCTION: go-env_go386
+# @DESCRIPTION:
+# Returns the appropriate GO386 setting for the CFLAGS in use.
+go-env_go386() {
+   # Piggy-back off any existing CPU_FLAGS_X86 usage in the ebuild if
+   # it's there.
+   if in_iuse cpu_flags_x86_sse2 && use cpu_flags_x86_sse2 ; then
+   echo 'sse2'
+   return
+   fi
+
+   if tc-cpp-is-true "defined(__SSE2__)" ${CFLAGS} ${CXXFLAGS} ; then
+   echo 'sse2'
+   return
+   fi
+
+   # Go 1.16 dropped explicit support for 386 FP and relies on software
+   # emulation instead in the absence of SSE2.
+   echo 'softfloat'
+}
+
 # @FUNCTION: go-env_goarm
 # @USAGE: [CHOST-value]
 # @DESCRIPTION:



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-24 Thread Sam James
commit: 5718f8440197298e0aa1df2a88a66057d2cdaf83
Author: Sam James  gentoo  org>
AuthorDate: Fri Nov 24 17:16:35 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Nov 24 17:16:35 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5718f844

Revert "go-env.eclass: also set GOARM & GO386 when applicable"

This reverts commit 64224abbe06824d47c554dced4149b51f3cebe91.

Ionen raises on the ML that this won't work unless cpu_flags_x86_sse2 is in 
IUSE,
so revert for now until can figure that bit out.

Signed-off-by: Sam James  gentoo.org>

 eclass/go-env.eclass | 21 -
 1 file changed, 21 deletions(-)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index 4bc8c4b15c65..08e3cf498a70 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -19,8 +19,6 @@ inherit toolchain-funcs
 # @FUNCTION: go-env_set_compile_environment
 # @DESCRIPTION:
 # Set up basic compile environment: CC, CXX, and GOARCH.
-# Necessary platform-specific settings such as GOARM or GO386 are also set
-# according to the Portage configuration when building for those architectures.
 # Also carry over CFLAGS, LDFLAGS and friends.
 # Required for cross-compiling with crossdev.
 # If not set, host defaults will be used and the resulting binaries are host 
arch.
@@ -30,9 +28,6 @@ go-env_set_compile_environment() {
tc-export CC CXX
 
export GOARCH="$(go-env_goarch)"
-   use arm && export GOARM=$(go-env_goarm)
-   use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
-
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"
export CGO_CXXFLAGS="${CGO_CXXFLAGS:-$CXXFLAGS}"
@@ -62,20 +57,4 @@ go-env_goarch() {
esac
 }
 
-# @FUNCTION: go-env_goarm
-# @USAGE: [CHOST-value]
-# @DESCRIPTION:
-# Returns the appropriate GOARM setting for the CHOST given, or the default
-# CHOST.
-go-env_goarm() {
-   case "${1:-${CHOST}}" in
-   armv5*) echo 5;;
-   armv6*) echo 6;;
-   armv7*) echo 7;;
-   *)
-   die "unknown GOARM for ${1:-${CHOST}}"
-   ;;
-   esac
-}
-
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-24 Thread Sam James
commit: 0061d784248dc29adc92c7881d2854deb6cc12e1
Author: WANG Xuerui  gentoo  org>
AuthorDate: Thu Nov 23 08:04:18 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Nov 24 16:26:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0061d784

go-env.eclass: unify GOARCH mapping logic with dev-lang/go

Previously the eclass featured its own GOARCH mapping, that took care
of less cases than the dev-lang/go ebuild did, and broke Go packages on
arches like loong (GOARCH=loong64), mips (4 GOARCHes supported in total)
or riscv (GOARCH=riscv64).

This patch adds a copy of the go_arch() helper from dev-lang/go to the
eclass and switches the go-env_set_compile_environment() function to use
that, to fix the problem at hand.

Fixes: 878d04daaf34765e6224e58139a9c45921d7a0c3
Closes: https://bugs.gentoo.org/917750
Signed-off-by: WANG Xuerui  gentoo.org>
Signed-off-by: Sam James  gentoo.org>

 eclass/go-env.eclass | 40 ++--
 1 file changed, 26 insertions(+), 14 deletions(-)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index ba4f6c3fbb59..08e3cf498a70 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -8,7 +8,7 @@
 # Flatcar Linux Maintainers 
 # @BLURB: Helper eclass for setting the Go compile environment. Required for 
cross-compiling.
 # @DESCRIPTION:
-# This eclass includes a helper function for setting the compile environment 
for Go ebuilds.
+# This eclass includes helper functions for setting the compile environment 
for Go ebuilds.
 # Intended to be called by other Go eclasses in an early build stage, e.g. 
src_unpack.
 
 if [[ -z ${_GO_ENV_ECLASS} ]]; then
@@ -25,24 +25,36 @@ inherit toolchain-funcs
 # (e.g. "emerge-aarch64-cross-linux-gnu foo" run on x86_64 will emerge "foo" 
for x86_64
 #  instead of aarch64)
 go-env_set_compile_environment() {
-   local arch="$(tc-arch)"
-   case "${arch}" in
-   x86)GOARCH="386" ;;
-   x64-*)  GOARCH="amd64" ;;
-   ppc64)  if [[ "$(tc-endian)" == "big" ]] ; then
-   GOARCH="ppc64"
-   else
-   GOARCH="ppc64le"
-   fi ;;
-   *)  GOARCH="${arch}" ;;
-   esac
-
tc-export CC CXX
-   export GOARCH
+
+   export GOARCH="$(go-env_goarch)"
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"
export CGO_CXXFLAGS="${CGO_CXXFLAGS:-$CXXFLAGS}"
export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}"
 }
 
+# @FUNCTION: go-env_goarch
+# @USAGE: [toolchain prefix]
+# @DESCRIPTION:
+# Returns the appropriate GOARCH setting for the target architecture.
+go-env_goarch() {
+   # By chance most portage arch names match Go
+   local tc_arch=$(tc-arch $@)
+   case "${tc_arch}" in
+   x86)echo 386;;
+   x64-*)  echo amd64;;
+   loong)  echo loong64;;
+   mips) if use abi_mips_o32; then
+   [[ $(tc-endian $@) = big ]] && echo mips || 
echo mipsle
+   elif use abi_mips_n64; then
+   [[ $(tc-endian $@) = big ]] && echo mips64 || 
echo mips64le
+   fi ;;
+   ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo 
ppc64le ;;
+   riscv) echo riscv64 ;;
+   s390) echo s390x ;;
+   *)  echo "${tc_arch}";;
+   esac
+}
+
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-24 Thread Sam James
commit: 64224abbe06824d47c554dced4149b51f3cebe91
Author: WANG Xuerui  gentoo  org>
AuthorDate: Thu Nov 23 08:28:54 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Nov 24 16:26:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64224abb

go-env.eclass: also set GOARM & GO386 when applicable

This is necessary for the build artifact to conform to the configured
ISA level and features on those arches. The logic is also taken from
the dev-lang/go ebuild.

Signed-off-by: WANG Xuerui  gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/33941
Signed-off-by: Sam James  gentoo.org>

 eclass/go-env.eclass | 21 +
 1 file changed, 21 insertions(+)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index 08e3cf498a70..4bc8c4b15c65 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -19,6 +19,8 @@ inherit toolchain-funcs
 # @FUNCTION: go-env_set_compile_environment
 # @DESCRIPTION:
 # Set up basic compile environment: CC, CXX, and GOARCH.
+# Necessary platform-specific settings such as GOARM or GO386 are also set
+# according to the Portage configuration when building for those architectures.
 # Also carry over CFLAGS, LDFLAGS and friends.
 # Required for cross-compiling with crossdev.
 # If not set, host defaults will be used and the resulting binaries are host 
arch.
@@ -28,6 +30,9 @@ go-env_set_compile_environment() {
tc-export CC CXX
 
export GOARCH="$(go-env_goarch)"
+   use arm && export GOARM=$(go-env_goarm)
+   use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat')
+
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"
export CGO_CXXFLAGS="${CGO_CXXFLAGS:-$CXXFLAGS}"
@@ -57,4 +62,20 @@ go-env_goarch() {
esac
 }
 
+# @FUNCTION: go-env_goarm
+# @USAGE: [CHOST-value]
+# @DESCRIPTION:
+# Returns the appropriate GOARM setting for the CHOST given, or the default
+# CHOST.
+go-env_goarm() {
+   case "${1:-${CHOST}}" in
+   armv5*) echo 5;;
+   armv6*) echo 6;;
+   armv7*) echo 7;;
+   *)
+   die "unknown GOARM for ${1:-${CHOST}}"
+   ;;
+   esac
+}
+
 fi



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-23 Thread Michał Górny
commit: d66f119323ca954a35946b9f3eeeaae0c6c69d0b
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Nov 23 14:55:18 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Nov 23 14:57:11 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d66f1193

multibuild.eclass: Fix passing return value from variants

Move the misplaced return value saving into the variant loop, so that
any non-successful return code is saved (as intended) rather than just
the last one.

Signed-off-by: Michał Górny  gentoo.org>

 eclass/multibuild.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index d8a5862731bf..f15d3327c7dd 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -129,8 +129,8 @@ multibuild_foreach_variant() {
_multibuild_run "${@}" \
> >(exec tee -a "${T}/build-${MULTIBUILD_ID}.log") 2>&1
lret=${?}
+   [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
done
-   [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
 
return ${ret}
 }



[gentoo-commits] repo/gentoo:master commit in: eclass/

2023-11-21 Thread Sam James
commit: 5bc696cb73b16a50be83fede86c06282d0abe963
Author: Sam James  gentoo  org>
AuthorDate: Sun Jul 16 22:20:05 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Nov 22 00:00:05 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bc696cb

toolchain-autoconf.eclass: handle different PN

Prepare for autoconf-vanilla.

Signed-off-by: Sam James  gentoo.org>

 eclass/toolchain-autoconf.eclass | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/eclass/toolchain-autoconf.eclass b/eclass/toolchain-autoconf.eclass
index ed8d5ff1412a..0211d810f6a2 100644
--- a/eclass/toolchain-autoconf.eclass
+++ b/eclass/toolchain-autoconf.eclass
@@ -30,7 +30,7 @@ _TOOLCHAIN_AUTOCONF_ECLASS=1
 # @ECLASS_VARIABLE: TC_AUTOCONF_INFOPATH
 # @DESCRIPTION:
 # Where to install info files if not slotting.
-TC_AUTOCONF_INFOPATH="${EPREFIX}/usr/share/autoconf-${PV}/info"
+TC_AUTOCONF_INFOPATH="${EPREFIX}/usr/share/${P}/info"
 
 toolchain-autoconf_src_prepare() {
find -name Makefile.in -exec sed -i '/^pkgdatadir/s:$:-@VERSION@:' {} + 
|| die
@@ -40,8 +40,11 @@ toolchain-autoconf_src_prepare() {
 toolchain-autoconf_src_configure() {
# Disable Emacs in the build system since it is in a separate package.
export EMACS=no
+
+   MY_P="${P#autoconf-}"
+
local myconf=(
-   --program-suffix="-${PV}"
+   --program-suffix="-${MY_P}"
)
if [[ -z "${TC_AUTOCONF_BREAK_INFOS}" && "${SLOT}" != 0 ]]; then
myconf+=(



<    1   2   3   4   5   6   7   8   9   10   >