gentoo-ebuilds/eclass
Nowa Ammerlaan c1992bfafe
kernel-install.eclass: support test of bin kernel with signed modules
The gentoo-kernel-bin does not have IUSE=modules-sign, but it does
have signed modules if it was built with KERNEL_IUSE_MODULES_SIGN.
Enforce signature verification in the test phase for this case.

Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
2025-07-20 20:10:40 +02:00
..
tests eclass/tests: dot-a: add commentary for strip test 2025-06-13 10:21:46 +01:00
acct-group.eclass
acct-user.eclass acct-user.eclass: handle ROOT != "" and ACCT_USER_HOME_OWNER != *:* 2025-05-25 12:40:35 -04:00
ada.eclass
alternatives.eclass
apache-2.eclass apache-2.eclass: set PCRE_CONFIG as well 2025-06-12 12:54:26 +01:00
apache-module.eclass
app-alternatives.eclass
aspell-dict-r1.eclass
autotools.eclass autotools.eclass: add slibtool dir for aclocal 2025-05-29 13:24:17 +01:00
bash-completion-r1.eclass
cargo.eclass
cdrom.eclass
check-reqs.eclass
chromium-2.eclass
cmake-multilib.eclass
cmake.eclass cmake.eclass: Avoid false positives by ensuring we find a function call 2025-06-24 21:44:05 +02:00
common-lisp-3.eclass
cron.eclass
crossdev.eclass
cuda.eclass
cvs.eclass
db-use.eclass
db.eclass
depend.apache.eclass
desktop.eclass
dist-kernel-utils.eclass
distutils-r1.eclass distutils-r1.eclass: Skip dep on ${PN} in EPYTEST_PLUGINS 2025-07-18 06:39:07 +02:00
docs.eclass
dot-a.eclass dot-a.eclass: make strip-lto remember if guarantee-fat ran 2025-07-03 23:20:45 -04:00
dotnet-pkg-base.eclass
dotnet-pkg.eclass
dotnet.eclass
dune.eclass
eapi8-dosym.eclass
eapi9-pipestatus.eclass
eapi9-ver.eclass
ecm-common.eclass
ecm.eclass ecm.eclass: Move dev-qt/qttools:6[assistant] behind IUSE doc again 2025-07-02 19:38:20 +02:00
edo.eclass edo.eclass: Fix two issues with edo() output 2025-05-14 10:12:32 +02:00
edos2unix.eclass
elisp-common.eclass
elisp.eclass
emboss-r3.eclass
estack.eclass
fcaps.eclass
ffmpeg-compat.eclass ffmpeg-compat.eclass: fix typo 2025-04-27 09:16:50 -04:00
findlib.eclass
fixheadtails.eclass
flag-o-matic.eclass flag-o-matic.eclass: Add functions for testing/stipping HIPFLAGS 2025-07-05 08:14:13 +01:00
font-ebdftopcf.eclass
font.eclass
fortran-2.eclass
frameworks.kde.org.eclass frameworks.kde.org.eclass: Drop SRC_URI support for KF5 PortingAids 2025-06-15 19:26:36 +02:00
freedict.eclass
gap-pkg.eclass
gear.kde.org.eclass kde-apps/kamoso: add 25.07.80_pre20250708 KF6-based snapshot 2025-07-09 21:03:25 +02:00
ghc-package.eclass
git-r3.eclass
gkrellm-plugin.eclass
gnome.org.eclass
gnome2-utils.eclass
gnome2.eclass
gnuconfig.eclass
gnustep-2.eclass
gnustep-base.eclass
go-env.eclass
go-module.eclass go-module.eclass: drop RESTRICT=strip 2025-07-13 06:05:29 +01:00
golang-base.eclass golang-base.eclass: drop RESTRICT=strip 2025-07-13 06:06:34 +01:00
golang-build.eclass
golang-vcs-snapshot.eclass
golang-vcs.eclass
greadme.eclass
gstreamer-meson.eclass gstreamer-meson.eclass: enable py3.13 2025-04-27 23:52:27 +01:00
guile-single.eclass
guile-utils.eclass
guile.eclass
haskell-cabal.eclass haskell-cabal.eclass: Add early check for invalid GHC cache 2025-05-15 09:09:53 +02:00
java-osgi.eclass
java-pkg-2.eclass
java-pkg-opt-2.eclass
java-pkg-simple.eclass
java-utils-2.eclass java-utils-2.eclass: automatic dependency on java-dep-check 2025-07-10 09:50:56 +02:00
java-vm-2.eclass
kde.org.eclass
kernel-2.eclass
kernel-build.eclass kernel-build.eclass: error out early if generic-uki but no zboot 2025-07-13 12:43:32 +02:00
kernel-install.eclass kernel-install.eclass: support test of bin kernel with signed modules 2025-07-20 20:10:40 +02:00
kodi-addon.eclass kodi-addon.eclass: cmake consumer never ported to EAPI-7, now its DEAD 2025-05-21 21:21:10 +02:00
latex-package.eclass
libretro-core.eclass
libtool.eclass
linux-info.eclass linux-info.eclass: Fix building modules when /lib/modules is locked down 2025-06-09 21:27:51 +01:00
linux-mod-r1.eclass linux-mod-r1.eclass: Fix building with different arch than KV_OUT_DIR 2025-06-05 11:55:03 +01:00
linux-mod.eclass
llvm-r1.eclass llvm-r1.eclass: update _LLVM_NEWEST_STABLE to 20 2025-06-14 15:26:18 +01:00
llvm-r2.eclass llvm-r2.eclass: update _LLVM_NEWEST_STABLE to 20 2025-06-14 15:26:07 +01:00
llvm-utils.eclass llvm-utils.eclass: Fix llvm_prepend_path w/ no '-d' and slot arg 2025-05-23 20:59:05 +02:00
llvm.eclass
llvm.org.eclass llvm.org.eclass: add comment explaining syntax choice 2025-07-19 12:35:10 +01:00
lua-single.eclass
lua-utils.eclass
lua.eclass
mate-desktop.org.eclass
mate.eclass
mercurial.eclass
meson-multilib.eclass
meson.eclass
mono-env.eclass
mount-boot-utils.eclass
mount-boot.eclass
mozcoreconf-v6.eclass
mozextension.eclass
mozlinguas-v2.eclass
multibuild.eclass
multilib-build.eclass
multilib-minimal.eclass
multilib.eclass
multiprocessing.eclass
myspell-r2.eclass
netsurf.eclass
nginx-module.eclass nginx{,-module}.eclass: do not fail if econf_ngx --help is called 2025-07-07 23:24:31 +01:00
nginx.eclass nginx{,-module}.eclass: do not fail if econf_ngx --help is called 2025-07-07 23:24:31 +01:00
ninja-utils.eclass
nuget.eclass
office-ext-r1.eclass
opam.eclass
optfeature.eclass
out-of-source-utils.eclass
out-of-source.eclass
pam.eclass
pax-utils.eclass
perl-functions.eclass
perl-module.eclass perl-module.eclass: move DIST_MAKE setting into perl-module_src_configure 2025-06-29 23:55:55 +01:00
php-ext-pecl-r3.eclass
php-ext-source-r3.eclass
php-pear-r2.eclass
plasma.kde.org.eclass
plocale.eclass
portability.eclass
postgres-multi.eclass
postgres.eclass
prefix.eclass
preserve-libs.eclass
pypi.eclass
python-any-r1.eclass python-any-r1.eclass: Fix := stripping again (now we have :3.11=) 2025-02-15 08:08:59 +01:00
python-r1.eclass
python-single-r1.eclass
python-utils-r1.eclass python-utils-r1.eclass: Preserve order in PYTEST_PLUGINS 2025-07-18 06:39:10 +02:00
qmail.eclass
qmake-utils.eclass
qt5-build.eclass qt5-build.eclass: Drop support for old versions 2025-06-09 22:47:16 +02:00
qt6-build.eclass qt6-build.eclass: ignore qtwayland for the dependency assert 2025-07-05 18:33:27 -04:00
readme.gentoo-r1.eclass
rebar-utils.eclass
rebar.eclass
rebar3.eclass
rocm.eclass rocm.eclass: add rocm_use_clang and strip flags in a better way 2025-07-05 08:14:13 +01:00
rpm.eclass
ruby-fakegem.eclass eclass/ruby-fakegem.eclass: drop ruby31 workaround 2025-05-30 08:32:46 +02:00
ruby-ng-gnome2.eclass
ruby-ng.eclass
ruby-single.eclass
ruby-utils.eclass
rust-toolchain.eclass
rust.eclass {dev-lang,sys-devel}/rust*: add 1.88.0_beta20250526 2025-06-04 07:36:55 +10:00
s6.eclass
savedconfig.eclass
scons-utils.eclass
secureboot.eclass
selinux-policy-2.eclass
sgml-catalog-r1.eclass
shell-completion.eclass
ssl-cert.eclass ssl-cert.eclass: fix dependencies 2025-05-27 14:14:49 -04:00
stardict.eclass
strip-linguas.eclass
subversion.eclass
sysroot.eclass sysroot.eclass: Add sysroot_run_prefixed convenience function 2025-07-09 12:21:58 +01:00
systemd.eclass
texlive-common.eclass
texlive-module.eclass
tmpfiles.eclass
toolchain-autoconf.eclass
toolchain-funcs.eclass toolchain{,-funcs}.eclass: Ensure hf/sf detection works for t64 CHOSTs 2025-07-14 20:49:54 +02:00
toolchain.eclass toolchain{,-funcs}.eclass: Ensure hf/sf detection works for t64 CHOSTs 2025-07-14 20:49:54 +02:00
tree-sitter-grammar.eclass tree-sitter-grammar.eclass: enable py3.14 2025-06-03 02:31:39 +01:00
udev.eclass
unpacker.eclass
user-info.eclass user-info.eclass: fix egetgroups when ROOT is not empty 2025-06-13 19:07:34 -04:00
usr-ldscript.eclass
vala.eclass
vcs-clean.eclass
vcs-snapshot.eclass
vdr-plugin-2.eclass
verify-sig.eclass verify-sig.eclass: Fix multi-file verify-sig_verify_signed_checksums 2025-07-02 10:12:17 +02:00
vim-doc.eclass
vim-plugin.eclass
vim-spell.eclass
virtualx.eclass
waf-utils.eclass waf-utils.eclass: Use a sysroot wrapper script when appropriate 2025-06-05 12:06:59 +01:00
webapp.eclass
wine.eclass wine.eclass: warn about missing amd64 when ARM64 && WoW64 2025-06-10 04:02:06 -04:00
wrapper.eclass
wxwidgets.eclass wxwidgets.eclass: remove EAPI 7 support 2025-06-21 12:07:35 +02:00
xdg-utils.eclass
xdg.eclass
xemacs-packages.eclass
xorg-3.eclass
xorg-meson.eclass eclass: Add xorg-meson eclass 2025-05-19 11:21:58 -04:00
zig-utils.eclass
zig.eclass zig.eclass: fix typos 2025-06-11 02:47:46 +01:00

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: readme.gentoo-r1.eclass
# @MAINTAINER:
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
# @SUPPORTED_EAPIS: 7 8
# @BLURB: install a doc file shown via elog messages
# @DESCRIPTION:
# An eclass for installing a README.gentoo doc file recording tips
# shown via elog messages.  With this eclass, those elog messages will only be
# shown at first package installation and a file for later reviewing will be
# installed under /usr/share/doc/${PF}
#
# You need to call readme.gentoo_create_doc in src_install phase and
# readme.gentoo_print_elog in pkg_postinst

if [[ -z ${_README_GENTOO_ECLASS} ]]; then
_README_GENTOO_ECLASS=1

case ${EAPI} in
	7|8) ;;
	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac

# @ECLASS_VARIABLE: DOC_CONTENTS
# @DEFAULT_UNSET
# @DESCRIPTION:
# The information that is used to create the README.gentoo file.

# @ECLASS_VARIABLE: DISABLE_AUTOFORMATTING
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty, DOC_CONTENTS information will be strictly respected,
# not getting it automatically formatted by fold.  If empty, it will
# rely on fold for formatting and 'echo -e' options to tweak lines a bit.

# @ECLASS_VARIABLE: FORCE_PRINT_ELOG
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty this variable forces elog messages to be printed.

# @ECLASS_VARIABLE: README_GENTOO_SUFFIX
# @DESCRIPTION:
# If you want to specify a suffix for README.gentoo file please export it.
: "${README_GENTOO_SUFFIX:=""}"

# @FUNCTION: readme.gentoo_create_doc
# @DESCRIPTION:
# Create doc file with ${DOC_CONTENTS} variable (preferred) and, if not set,
# look for "${FILESDIR}/README.gentoo" contents.  You can use
# ${FILESDIR}/README.gentoo-${SLOT} also.
# Usually called at src_install phase.
readme.gentoo_create_doc() {
	debug-print-function ${FUNCNAME} "$@"

	if [[ -n "${DOC_CONTENTS}" ]]; then
		if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then
			echo "${DOC_CONTENTS}" > "${T}"/README.gentoo || die
		else
			local saved_flags=$-
			set -f				# disable filename expansion in echo arguments
			echo -e ${DOC_CONTENTS} | fold -s -w 70 \
				| sed 's/[[:space:]]*$//' > "${T}"/README.gentoo
			assert
			set +f -${saved_flags}
		fi
	elif [[ -f "${FILESDIR}/README.gentoo-${SLOT%/*}" ]]; then
		cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die
	elif [[ -f "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" ]]; then
		cp "${FILESDIR}/README.gentoo${README_GENTOO_SUFFIX}" "${T}"/README.gentoo || die
	else
		die "You are not specifying README.gentoo contents!"
	fi

	( # subshell to avoid pollution of calling environment
		docinto .
		dodoc "${T}"/README.gentoo
	)
	README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo")
}

# @FUNCTION: readme.gentoo_print_elog
# @DESCRIPTION:
# Print elog messages with "${T}"/README.gentoo contents.  They will be
# shown only when package is installed at first time.
# Usually called at pkg_postinst phase.
#
# If you want to show them always, please set FORCE_PRINT_ELOG to a non empty
# value in your ebuild before this function is called.
# This can be useful when, for example, DOC_CONTENTS is modified, then, you can
# rely on specific REPLACING_VERSIONS handling in your ebuild to print messages
# when people update from versions still providing old message.
readme.gentoo_print_elog() {
	debug-print-function ${FUNCNAME} "$@"

	if [[ -z "${README_GENTOO_DOC_VALUE}" ]]; then
		die "readme.gentoo_print_elog invoked without matching readme.gentoo_create_doc call!"
	elif ! [[ -n "${REPLACING_VERSIONS}" ]] || [[ -n "${FORCE_PRINT_ELOG}" ]]; then
		echo -e "${README_GENTOO_DOC_VALUE}" | while read -r ELINE; do elog "${ELINE}"; done
		elog ""
		elog "(Note: Above message is only printed the first time package is"
		elog "installed. Please look at ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
		elog "for future reference)"
	fi
}

fi