| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
inherit linux-info
|
|
6 |
inherit eapi9-ver linux-info
|
| 7 |
7 |
|
| 8 |
8 |
DESCRIPTION="Gentoo fork of installkernel script from debianutils"
|
| 9 |
9 |
HOMEPAGE="
|
| ... | ... | |
| 16 |
16 |
|
| 17 |
17 |
LICENSE="GPL-2+"
|
| 18 |
18 |
SLOT="0"
|
| 19 |
|
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
|
19 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
| 20 |
20 |
IUSE="dracut efistub grub refind systemd systemd-boot ugrd uki ukify"
|
| 21 |
21 |
REQUIRED_USE="
|
| 22 |
|
?? ( efistub grub systemd-boot )
|
| 23 |
|
refind? ( !systemd-boot !grub )
|
| 24 |
22 |
systemd-boot? ( systemd )
|
| 25 |
23 |
ukify? ( uki )
|
| 26 |
24 |
?? ( dracut ugrd )
|
| 27 |
25 |
"
|
| 28 |
|
# Only select one flag that sets "layout=", except for uki since grub,
|
| 29 |
|
# systemd-boot, and efistub booting are all compatible with UKIs and
|
| 30 |
|
# the uki layout.
|
| 31 |
|
#
|
| 32 |
|
# Refind does not set a layout=, it is compatible with the compat, uki
|
| 33 |
|
# and efistub layout. So block against only grub and systemd-boot.
|
| 34 |
|
#
|
| 35 |
26 |
# systemd-boot could be made to work without the systemd flag, but this
|
| 36 |
27 |
# makes no sense since in systemd(-utils) the boot flag already
|
| 37 |
28 |
# requires the kernel-install flag.
|
| ... | ... | |
| 46 |
37 |
RDEPEND="
|
| 47 |
38 |
!<=sys-kernel/installkernel-systemd-3
|
| 48 |
39 |
dracut? (
|
| 49 |
|
>=sys-kernel/dracut-060_pre20240104-r4
|
|
40 |
>=sys-kernel/dracut-106
|
| 50 |
41 |
uki? (
|
| 51 |
42 |
|| (
|
| 52 |
43 |
sys-apps/systemd[boot(-)]
|
| ... | ... | |
| 55 |
46 |
)
|
| 56 |
47 |
)
|
| 57 |
48 |
efistub? (
|
| 58 |
|
systemd? ( >=app-emulation/virt-firmware-24.2_p20240315-r2 )
|
|
49 |
systemd? ( >=app-emulation/virt-firmware-24.7 )
|
| 59 |
50 |
!systemd? ( sys-boot/uefi-mkconfig )
|
| 60 |
51 |
)
|
| 61 |
52 |
grub? ( sys-boot/grub )
|
| 62 |
53 |
refind? ( sys-boot/refind )
|
| 63 |
54 |
systemd? (
|
| 64 |
55 |
|| (
|
| 65 |
|
sys-apps/systemd[kernel-install(-)]
|
| 66 |
|
sys-apps/systemd-utils[kernel-install(-)]
|
|
56 |
>=sys-apps/systemd-255[kernel-install(-)]
|
|
57 |
>=sys-apps/systemd-utils-255[kernel-install(-)]
|
| 67 |
58 |
)
|
| 68 |
59 |
)
|
| 69 |
60 |
systemd-boot? (
|
| ... | ... | |
| 78 |
69 |
sys-apps/systemd-utils[boot(-),ukify(-)]
|
| 79 |
70 |
)
|
| 80 |
71 |
)
|
| 81 |
|
ugrd? ( sys-kernel/ugrd )
|
|
72 |
ugrd? ( >=sys-kernel/ugrd-1.31.2 )
|
| 82 |
73 |
!=sys-apps/systemd-255.2-r1
|
| 83 |
74 |
!=sys-apps/systemd-255.2-r0
|
| 84 |
75 |
!~sys-apps/systemd-255.1
|
| ... | ... | |
| 123 |
114 |
use efistub && doexe hooks/systemd/95-efistub-kernel-bootcfg.install
|
| 124 |
115 |
use refind && doexe hooks/systemd/95-refind-copy-icon.install
|
| 125 |
116 |
|
|
117 |
if use grub && use uki; then
|
|
118 |
exeinto /etc/grub.d
|
|
119 |
doexe grub/05_uki
|
|
120 |
fi
|
|
121 |
|
| 126 |
122 |
if use systemd; then
|
| 127 |
123 |
sed -e 's/${SYSTEMD_KERNEL_INSTALL:=0}/${SYSTEMD_KERNEL_INSTALL:=1}/g' -i installkernel ||
|
| 128 |
124 |
die "enabling systemd's kernel-install failed"
|
| ... | ... | |
| 182 |
178 |
|
| 183 |
179 |
pkg_postinst() {
|
| 184 |
180 |
# show only when upgrading to 14+
|
| 185 |
|
if [[ -n "${REPLACING_VERSIONS}" ]] && ver_test "${REPLACING_VERSIONS}" -lt 14; then
|
|
181 |
if ver_replacing -lt 14; then
|
| 186 |
182 |
elog "Version 14 and up of ${PN} effectively merges"
|
| 187 |
183 |
elog "${PN}-gentoo and ${PN}-systemd."
|
| 188 |
184 |
elog "Switching between the traditional installkernel and systemd's"
|
| ... | ... | |
| 196 |
192 |
fi
|
| 197 |
193 |
|
| 198 |
194 |
# show only on first install of version 20+
|
| 199 |
|
if [[ -z "${REPLACING_VERSIONS}" ]] || ver_test "${REPLACING_VERSIONS}" -lt 20; then
|
|
195 |
if [[ -z "${REPLACING_VERSIONS}" ]] || ver_replacing -lt 20; then
|
| 200 |
196 |
if has_version "sys-boot/grub" && ! use grub; then
|
| 201 |
197 |
elog "sys-boot/grub is installed but the grub USE flag is not enabled."
|
| 202 |
198 |
elog "Users may want to enable this flag to automatically update the"
|