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>
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>
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>
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>
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>
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>
.. 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>
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>
* 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>
"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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>