Commit Graph
7267 Commits
Author SHA1 Message Date
Sam James 5837f60b82 toolchain.eclass: fix USE=doc for non-gcc (kgcc64)
We can simplify the has_feature ... && _use_if ... later.

Signed-off-by: Sam James <sam@gentoo.org>
2025-02-07 18:33:24 +00:00
Sam James 672b4e16d5 toolchain.eclass: depend on doxygen for USE=doc
Needed for libstdc++ docs.

This goes back to 3998c0e241690b9f5520a66c36382d6173c2bdad and
337957a79e26b67eda2ef3bd5af71f75217b32b5. I don't see why we want
that behaviour these days.

Closes: https://bugs.gentoo.org/949398
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-07 18:04:11 +00:00
Z. Liu c19cd9a609 toolchain.eclass: fix typo sys-devel/ -> llvm-core/
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40452
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-06 16:40:18 +00:00
Sam James 1f793c840c toolchain.eclass: drop flags not supported by GCC 9
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-05 20:37:19 +00:00
Arthur Zamarin 40206b0041 rust.eclass: add 1.84.1
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-02-05 20:37:08 +02:00
Michał Górny d12a6adf88 llvm.org.eclass: Add 21.0.0_pre20250201 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-02-01 14:14:38 +01:00
Ionen Wolkens 7827b36dd3 qt6-build.eclass: update for user_facing_tool_links.txt changes
Still keep a bash loop given want to keep the sanity check and it
spares us from doing `cd "${D}${QT6_PREFIX}"` for a `xargs ln` to
work, but it let us simplify a little bit.

Keeping old version in its own block so it's easy to drop later.

Also drop the empty ${links} variable from the sanity check, dates
back to old unused code.

Closes: https://bugs.gentoo.org/949126
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-01-31 19:34:21 -05:00
Michał Górny e334611f71 llvm.org.eclass: main is now 21.x
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-31 22:50:57 +01:00
Michał Górny 2ea3c0bfc6 llvm.org.eclass: Remove old snapshots
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-31 22:50:56 +01:00
Ionen Wolkens 0fe910b624 qt6-build.eclass: add USE=custom-cflags, force -march=x86-64-v*
See a new user have issues with this every other week despite
the already large amount of workarounds in this function which
been getting ridiculous.

While -march=native and similar is fine for "most", still believe
it is time to give up and force x86-64-v* to ensure every other
user do not run into a build failure or other problems.

Optimization-wise it should make very little difference, but if
really must there is USE=custom-cflags. Note that this would also
allow LTO again which may or may not lead to runtime issues.

Users reading this that are wondering why portage is rebuilding
over this, use --changed-use/-U rather than --newuse/-N.
Thankfully qtwebengine already has IUSE=custom-cflags so that will
not trigger either way.

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-01-31 03:19:48 -05:00
Sam James d0f22208ed toolchain.eclass: add TODO for --enable-version-specific-runtime-libs
While we pass it only for Darwin, I have to wonder if these days
at least whether we should be using that all the time instead of passing
LIBPATH.

Prompted by https://inbox.sourceware.org/libc-alpha/5fc11ae8d8cc26b8cb2b500ee7a08ce8f6e98588.camel@xry111.site/.

Signed-off-by: Sam James <sam@gentoo.org>
2025-01-30 01:19:49 +00:00
Matt Jolly 6043362439 rust.eclass: Drop 1.54.0
This slot was removed when the (m)rust(c) bootstrap path was added
but its removal from the eclass was overlooked.

Signed-off-by: Matt Jolly <kangie@gentoo.org>
2025-01-30 09:16:22 +10:00
Sam James ddb45b4bb4 cargo.eclass: respect MAKEOPTS for cargo test
Without this, while (test) compile jobs respect MAKEOPTS via our config settings
already deployed via the eclass, *test* jobs do not.

We may want to consider setting NEXTEST_TEST_THREADS and/or having
a cargo_enable_tests helper in the eclass at some point too.

Bug: https://github.com/rust-lang/cargo/issues/8430
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-28 12:14:20 +00:00
Sam James 914fa2ab19 flag-o-matic.eclass: fix negation of -fstack-protector-all
Closes: https://bugs.gentoo.org/943761
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-28 07:19:22 +00:00
Michał Górny 980eeb06da llvm.org.eclass: Add 20.0.0_pre20250125 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-25 14:32:54 +01:00
Michał Górny 15f80deb9b llvm.org.eclass: Add 20.0.0_pre20250122 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-22 20:15:18 +01:00
Michał Górny c44b01389c llvm.org.eclass: SPIRV is production since 20.0.0_pre20250122
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-22 20:15:17 +01:00
Sam James b9c5c7723b toolchain.eclass: use lib*, not get_libdir for cross
get_libdir isn't right for ROOT and cross-compilation.

Closes: https://bugs.gentoo.org/908455
Bug: https://bugs.gentoo.org/794181
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-21 23:12:54 +00:00
Petr Vaněk 1952483833 mono.eclass: mark as DEAD
The eclass is no longer used by any package in the tree nor in ::dotnet
overlay.

Bug: https://bugs.gentoo.org/372453
Bug: https://bugs.gentoo.org/374867
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
2025-01-20 10:44:40 +01:00
Petr Vaněk 6ee5fb922e dotnet.eclass: mark as deprecated
The eclass has last two consumers in the tree. One of them is already
last-rited, the second is slowly rotting. However, the eclass is still
used in ::dotnet overlay, which does not seem to be very active and it
is not in good shape.

Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
2025-01-20 10:44:29 +01:00
Sam James d6788adfff toolchain.eclass: add TODO for collecting differing bootstrap objects
Add a TODO for bootstrap comparison failures, where we should include the stage2 & stage3
differing objects to avoid having to ask reporters to manually collect...

Bug: https://bugs.gentoo.org/904426
Bug: https://bugs.gentoo.org/920719
Bug: https://bugs.gentoo.org/932789
Bug: https://bugs.gentoo.org/947752
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-19 01:16:12 +00:00
Sam James 2ca5e513fa toolchain.eclass: fix finding config.logs in death hooks
Bug: https://bugs.gentoo.org/948045
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-18 23:51:22 +00:00
Sam James 5f69535668 toolchain.eclass: drop redundant 'a' flag from tar invocation
.. for death hooks. We're not compressing yet, hence we certainly
don't need autodetection of compression based on suffix...

Bug: https://bugs.gentoo.org/948045
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-18 23:51:22 +00:00
Sam James 71d7f80e14 toolchain.eclass: don't try to compress a (non-existent) compress file
... in death hook. Pointed out by Eli.

Bug: https://bugs.gentoo.org/948045
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-18 23:51:21 +00:00
Michał Górny be481e205c llvm.org.eclass: Add 20.0.0_pre20250118 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-18 16:02:40 +01:00
Michał Górny ee80caabaf llvm.org.eclass: Remove old snapshots
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-18 08:22:05 +01:00
Michał Górny 89e3c14163 cargo.eclass: Emit a warning if the package uses 300+ crates
Emit a QA warning suggesting the use of crate tarball, when the package
in question uses 300 crates or more.  Such a long crate lists cause
ebuilds and Manifests to grow very fast, causing significant space
consumption on end user systems (including users who are not using
the package in question) and git history growth.  On top of that,
fetching that many crates takes significant time.

The number of 300 is pretty arbitrary, chosen approximately to match
Manifests that are over 100 KiB in size.  We should probably look into
lowering in the future, as more packages are transitioned.

Closes: https://github.com/gentoo/gentoo/pull/40096
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-16 15:06:07 +01:00
Sam James 6c73b4acba toolchain.eclass: another death_hooks fix
Hopefully the last.

Bug: https://bugs.gentoo.org/948045
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-16 08:21:17 +00:00
Sam James ae18c5b414 toolchain.eclass: fix toolchain_death_notice more
* Go back to -arf. As Marcus points out, it doesn't make sense to append
  there.

* Compress afterwards given we want to handle both directories.

Bug: https://bugs.gentoo.org/948045
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-15 19:37:40 +00:00
Ulrich Müller 623294d2cb optfeature.eclass: Update example
"app-misc/baz[bar]" needs to be quoted, otherwise they may be
interpreted as filename expansion patterns.

Signed-off-by: Ulrich Müller <ulm@gentoo.org>
2025-01-15 15:39:33 +01:00
Maciej Barć 15f398581e eclass/dotnet-pkg-base.eclass: add DOTNET_VERBOSITY user variable
DOTNET_VERBOSITY controls dotnet restore/build/test verbosity.
We allow the user to set this value to any other to value because it
might be helpful when debugging dotnet processes. On the other hand,
generally warnings and errors provide enough info for debugging package
emerge process.

Normally we use the default value - "minimal", that still reports what is
being built and any warnings/errors but it might come handy to set it
to a higher value for the Gentoo Tinderbox CI.

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
2025-01-14 18:07:18 +01:00
Sam James f38cc077c1 toolchain.eclass: fix toolchain_death_notice
* Actually include config.logs again
* Really compress (add 'a' to auto-compress based on suffix)

Bug: https://bugs.gentoo.org/948045
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-14 04:51:32 +00:00
Michał Górny 6e3c53e76c llvm.org.eclass: Add 20.0.0_pre20250111 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-11 19:11:50 +01:00
Arthur Zamarin 17d2c57c96 rust.eclass: add rust 1.84.0
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
2025-01-11 10:09:59 +02:00
Nowa Ammerlaan 422a7e51c1 kernel-install.eclass: verify uki/kernel image before installing
This avoids accidentally installing a kernel image or generic UKI with an
invalid signature in both gentoo-kernel and gentoo-kernel-bin. This means we
will catch regressions such as described below earlier, notably it will now
error out when building the binpkgs for gentoo-kernel-bin.

We also add some logic to recover from the case where the kernel image is
larger then it should be. This may be the case with ukify>=257 because starting
from this version onwards the space that the kernel needs to extract and run
is reserved in the .linux section of the UKI as padding. Objcopy unfortunately
copies this padding along with the rest of the data, invalidating the signature.
In previous versions of ukify this was not an issue because the .linux section
was always the last section in the UKI and you could therefore usually get away
with not reserving the extra required space.

Sbverify helpfully reports a warning about this padding with the exact size
the kernel image should have. We use this to strip the padding from the
kernel image, and verify if the signature problem is now resolved. There may be
a better way to do this that does not involve parsing the output of sbverify,
but I have not been able to find any.

See-also: https://github.com/systemd/systemd/issues/35851
See-also: https://forums.gentoo.org/viewtopic-t-1172386.html
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-01-10 17:44:19 +01:00
Michał Górny c80dc591e4 verify-sig.eclass: Add verify-sig_uncompress_verify_unpack
Add a function that carries out the surprisingly common pattern of
uncompress-verify-unpack found in kernel.org distfiles, where
the signature is created against the uncompressed archive rather than
the actual distfile.  Just like the code currently copied across
ebuilds, the function uses a pipeline to simultaneously decompress,
unpack and verify the signature, except with correct error handling
this time.

Note that the code technically implies that the archive will be unpacked
even if the signature does not match -- the ebuild will abort
afterwards.

Thanks to Ulrich Müller for the suggestion!

Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-10 14:15:02 +01:00
sin-ackandEric Joldasov 33f22ac2fd zig-utils.eclass: add ZIG_NEEDS_LLVM variable
If set to a non-empty value, the package will BDEPEND on a Zig package
with LLVM enabled. This is currently required for packages that require
C/C++ source files to be compiled with Zig.

There's some special logic required to detect which Zig binary we should
actually use, because we may have dev-lang/zig[-llvm] installed with
dev-lang/zig-bin (in which case we would need to pick zig-bin over zig).

Tested in a clean stage3 chroot with dev-lang/zig[-llvm] and
dev-lang/zig-bin installed, in which case zig-utils.eclass will pick
zig-bin over zig.

Co-authored-by: Eric Joldasov <bratishkaerik@landless-city.net>
Signed-off-by: sin-ack <sin-ack@protonmail.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2025-01-08 08:32:59 +02:00
Ionen Wolkens 25a29b7fc4 qt6-build.eclass: add avx512vnni to qtwebengine's sanitizing
Possible that more flags from bug #947696 will cause issues (untested),
but at least looked at all the -mavx512* that xnnpack uses and the only
one that's missing was vnni.

qtbase does not care for it, so put it in qtwebengine's block.

Closes: https://bugs.gentoo.org/947696
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
2025-01-07 21:14:04 -05:00
Volkmar W. Pogatzki 495a0a25e1 java-pkg-2.eclass: drop support for EAPI 7
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/40023
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
2025-01-07 12:34:52 +01:00
Nowa Ammerlaan 9163b23ef6 kernel-{build,install}.eclass: exclude any generated keys from binpkgs
The kernel build system supports generating a new module signing key if the
CONFIG_MODULE_SIG_KEY is set to the default value (MODULES_SIGN_KEY is not set)
and no key exists at that default location.

This results in the unfortunate situation where private key material ends up
in generated binary packages. That is almost never what you want since binary
packages are usually readable by regular users. To avoid this we move the key
out of the ED in the install phase, and move it back in the preinst phase after
the binary package has been built.

This also means that when distributing built binary packages to other systems
the signing key will now never be installed onto all those other systems, which
is probably what you want anyway.

Note, there is no change for folks who use externally managed keys, i.e. for
everyone who has MODULES_SIGN_KEY, MODULE_SIGN_CERT set.

Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/40017
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-01-06 21:25:37 +01:00
Nowa Ammerlaan 54e6dfe511 linux-mod-r1.eclass: drop left over -z ROOT condition
This we don't need any more since dist-kernel_reinstall_initramfs already
does the appropriate checks.

Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-01-06 21:25:34 +01:00
Nowa Ammerlaan 07dd6fa527 kernel-build.eclass: resolve configure problem with USE=secureboot
if no keys set, then secureboot.eclass now inherits linux-info.eclass to check
for potential key candidates in the kernel config. This would set KV_FULL
and create a mess later on in the configure phase. Ensure that KV_FULL remains
local to the setup phase specifically for the kernel packages.

Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-01-06 21:25:33 +01:00
Nowa Ammerlaan 65594d3863 kernel-install.eclass: only remove initrd,uki.efi if src dir still exists
Closes: https://bugs.gentoo.org/947359
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-01-06 15:37:49 +01:00
Nowa Ammerlaan bb6c8448a1 secureboot.eclass: QOL fixes based on user feedback
Previously there was some misalignment between how MODULES_SIGN_* and
SECUREBOOT_SIGN_* are handled.

- USE=modules-sign with unset MODULES_SIGN_* would cause the kernel build
	system to generate a new key, while USE=secureboot with unset
	SECUREBOOT_SIGN_* would die. Align this better by adding some sensible
	default locations to look for a key (sbctl and kernel) and by adding some
	logic to generate a new key. Use for the new key the same config files
	that the kernel would use if they exist.
- USE=modules-sign infers the certificate from the key if the certificate is
	not set, whereas USE=secureboot would not do this. Align this better by
	setting the SECUREBOOT_SIGN_CERT to the SECUREBOOT_SIGN_KEY if the later is
	set but the former is not.

Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/39974
Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-01-05 14:39:26 +01:00
Nowa Ammerlaan b678c191a5 kernel-build.eclass: pcrpkey should be PEM not DER
We sill need the call to openssl to ensure that we don't accidentally append
the key itself to the UKI.

Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-01-05 14:39:25 +01:00
Sam James 24a553bfcb gstreamer-meson.eclass: add GLIB_VERSION per gst major version
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-04 21:32:27 +00:00
Sam James c891c27ff3 gstreamer-meson.eclass: cleanup TODOs for old/new versions
Signed-off-by: Sam James <sam@gentoo.org>
2025-01-04 21:32:27 +00:00
Michał Górny 83da955674 llvm.org.eclass: Add 20.0.0_pre20250104 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-04 16:27:44 +01:00
Michał Górny 20087812f7 llvm.org.eclass: Remove old snapshots
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2025-01-04 16:27:43 +01:00
James Le Cuirot 44d2dbd6db toolchain.eclass: Don't prefixify dynamic linker for cross-compilers
Cross environments within a prefixed system do not have a nested prefix,
i.e. they are located at ${EPREFIX}/usr/${CHOST}, not
${EPREFIX}/usr/${CHOST}/${EPREFIX}. Binaries built with the
cross-compiler should therefore get an unprefixed dynamic linker path by
default so that they work out of the box with QEMU's -L option.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
2025-01-03 17:54:17 +00:00