Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/
Date: Sun, 26 May 2019 10:09:47
Message-Id: 1558865301.b9d492272cf54efd7a2e3d7127bbe7260c0f40bb.whissi@gentoo
1 commit: b9d492272cf54efd7a2e3d7127bbe7260c0f40bb
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 26 10:08:05 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun May 26 10:08:21 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9d49227
7
8 sys-firmware/intel-microcode: drop old
9
10 Package-Manager: Portage-2.3.66, Repoman-2.3.12
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sys-firmware/intel-microcode/Manifest | 2 -
14 .../intel-microcode-20180807a_p20190512.ebuild | 239 --------------------
15 .../intel-microcode-20190514_p20190512.ebuild | 248 ---------------------
16 3 files changed, 489 deletions(-)
17
18 diff --git a/sys-firmware/intel-microcode/Manifest b/sys-firmware/intel-microcode/Manifest
19 index 227312869e8..8919ca8e9d5 100644
20 --- a/sys-firmware/intel-microcode/Manifest
21 +++ b/sys-firmware/intel-microcode/Manifest
22 @@ -1,4 +1,2 @@
23 -DIST intel-microcode-collection-20190512.tar.xz 5085812 BLAKE2B 4b873be318ea1c1d5157ccf9646ccdaf34caabfbdda51cae92692acce83eacce713e7989b2c00cce46df16c501f7f9863478106fc9ce8912ccfca8103f85c45d SHA512 d0a0d0d82522d07549343ee9817133cd721f953421b945584434d8ebb10f0bd6acdd2b1df3daf5a925d3e0f9ea695a4ae81935699d8d655f58daf4fff8a4bd20
24 DIST intel-microcode-collection-20190525.tar.xz 5079704 BLAKE2B bc46128693eb9c14e9b4cf994c8affc332b236c222bf57df79e4f8aa4398d125734c1b61d9d0559518941642a5cad1345b5f894c6ed729273c3f8b1a54311113 SHA512 5aeb83bd1aaeb1e870447d18f91aa8f155da29dd89c3cec546a8a741c0c9fd21647cc64083dc5ca482562803a8e89c910ed2e18a6f232f3df64ac360002beaf4
25 -DIST microcode-20180807a.tgz 1628061 BLAKE2B a6b5a07596a0b1687efb95c207b2194865b2f975cc0d761a687d5b9d8fea63e777eb73373113f356a18592fd53651cf37d044d4e98cdfe6b306393b54ac06129 SHA512 3cd6794a5ce26e86f7b644e523ba978699316046e593da215b73b17c4b43049ac4a81636e2ce3e727d06c2efbac98657764aa3ff355edb429127585bb49a9b10
26 DIST microcode-20190514.tar.gz 2447290 BLAKE2B c137342d6a4e662f1fe746e69c97f02a49c75645def0a74edde9e99eae29b2cea70206b2666e4f38c8439cc661adcdda6b60a352b11791c5bc9913cb19864a41 SHA512 fd5e82708d4a7f08630a2c51a182814cc4c0fbd88fe473e871b9784c03cb87e804a9ed4c2f3e041696aabfdd60996f2d50a175bea90f1644f6f3205a37215017
27
28 diff --git a/sys-firmware/intel-microcode/intel-microcode-20180807a_p20190512.ebuild b/sys-firmware/intel-microcode/intel-microcode-20180807a_p20190512.ebuild
29 deleted file mode 100644
30 index 06557d9fb74..00000000000
31 --- a/sys-firmware/intel-microcode/intel-microcode-20180807a_p20190512.ebuild
32 +++ /dev/null
33 @@ -1,239 +0,0 @@
34 -# Copyright 1999-2019 Gentoo Authors
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -EAPI="6"
38 -
39 -inherit linux-info toolchain-funcs mount-boot
40 -
41 -# Find updates by searching and clicking the first link (hopefully it's the one):
42 -# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
43 -
44 -COLLECTION_SNAPSHOT="${PV##*_p}"
45 -INTEL_SNAPSHOT="${PV/_p*}"
46 -NUM="28087"
47 -DESCRIPTION="Intel IA32/IA64 microcode update data"
48 -HOMEPAGE="http://inertiawar.com/microcode/ https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}"
49 -SRC_URI="https://downloadmirror.intel.com/${NUM}/eng/microcode-${INTEL_SNAPSHOT}.tgz
50 - https://dev.gentoo.org/~whissi/dist/intel-microcode/intel-microcode-collection-${COLLECTION_SNAPSHOT}.tar.xz"
51 -
52 -LICENSE="intel-ucode"
53 -SLOT="0"
54 -KEYWORDS="-* amd64 x86"
55 -IUSE="hostonly initramfs +split-ucode vanilla"
56 -REQUIRED_USE="|| ( initramfs split-ucode )"
57 -
58 -DEPEND="sys-apps/iucode_tool"
59 -
60 -# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
61 -RDEPEND="hostonly? ( sys-apps/iucode_tool )"
62 -
63 -RESTRICT="binchecks bindist mirror strip"
64 -
65 -S=${WORKDIR}
66 -
67 -# Blacklist bad microcode here.
68 -# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
69 -MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1"
70 -
71 -# In case we want to set some defaults ...
72 -MICROCODE_SIGNATURES_DEFAULT=""
73 -
74 -# Advanced users only!
75 -# Set MIRCOCODE_SIGNATURES to merge with:
76 -# only current CPU: MICROCODE_SIGNATURES="-S"
77 -# only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676"
78 -# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
79 -
80 -pkg_pretend() {
81 - use initramfs && mount-boot_pkg_pretend
82 -}
83 -
84 -src_prepare() {
85 - default
86 -
87 - # Prevent "invalid file format" errors from iucode_tool
88 - rm -f "${S}"/intel-ucod*/list || die
89 -}
90 -
91 -src_install() {
92 - # This will take ALL of the upstream microcode sources:
93 - # - microcode.dat
94 - # - intel-ucode/
95 - # In some cases, they have not contained the same content (eg the directory has newer stuff).
96 - MICROCODE_SRC=(
97 - "${S}"/intel-ucode/
98 - "${S}"/intel-ucode-with-caveats/
99 - )
100 -
101 - # Allow users who are scared about microcode updates not included in Intel's official
102 - # microcode tarball to opt-out and comply with Intel marketing
103 - if ! use vanilla; then
104 - MICROCODE_SRC+=( "${S}"/intel-microcode-collection-${COLLECTION_SNAPSHOT} )
105 - fi
106 -
107 - # These will carry into pkg_preinst via env saving.
108 - : ${MICROCODE_BLACKLIST=${MICROCODE_BLACKLIST_DEFAULT}}
109 - : ${MICROCODE_SIGNATURES=${MICROCODE_SIGNATUES_DEFAULT}}
110 -
111 - opts=(
112 - ${MICROCODE_BLACKLIST}
113 - ${MICROCODE_SIGNATURES}
114 - # be strict about what we are doing
115 - --overwrite
116 - --strict-checks
117 - --no-ignore-broken
118 - # we want to install latest version
119 - --no-downgrade
120 - # show everything we find
121 - --list-all
122 - # show what we selected
123 - --list
124 - )
125 -
126 - # The earlyfw cpio needs to be in /boot because it must be loaded before
127 - # rootfs is mounted.
128 - use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED%/}"/boot/intel-uc.img )
129 -
130 - keepdir /lib/firmware/intel-ucode
131 - opts+=( --write-firmware="${ED%/}/lib/firmware/intel-ucode" )
132 -
133 - iucode_tool \
134 - "${opts[@]}" \
135 - "${MICROCODE_SRC[@]}" \
136 - || die "iucode_tool ${opts[@]} ${MICROCODE_SRC[@]}"
137 -
138 - dodoc releasenote
139 -}
140 -
141 -pkg_preinst() {
142 - if [[ ${MICROCODE_BLACKLIST} != ${MICROCODE_BLACKLIST_DEFAULT} ]]; then
143 - ewarn "MICROCODE_BLACKLIST is set to \"${MICROCODE_BLACKLIST}\" instead of default \"${MICROCODE_BLACKLIST_DEFAULT}\". You are on your own!"
144 - fi
145 -
146 - if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
147 - ewarn "Package was created using advanced options:"
148 - ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${MICROCODE_SIGNATURES_DEFAULT}\"!"
149 - fi
150 -
151 - # Make sure /boot is available if needed.
152 - use initramfs && mount-boot_pkg_preinst
153 -
154 - local _initramfs_file="${ED%/}/boot/intel-uc.img"
155 -
156 - if use hostonly; then
157 - # While this output looks redundant we do this check to detect
158 - # rare cases where iucode_tool was unable to detect system's processor(s).
159 - local _detected_processors=$(iucode_tool --scan-system 2>&1)
160 - if [[ -z "${_detected_processors}" ]]; then
161 - ewarn "Looks like iucode_tool was unable to detect any processor!"
162 - else
163 - einfo "Only installing ucode(s) for ${_detected_processors#iucode_tool: system has } due to USE=hostonly ..."
164 - fi
165 -
166 - opts=(
167 - --scan-system
168 - # be strict about what we are doing
169 - --overwrite
170 - --strict-checks
171 - --no-ignore-broken
172 - # we want to install latest version
173 - --no-downgrade
174 - # show everything we find
175 - --list-all
176 - # show what we selected
177 - --list
178 - )
179 -
180 - # The earlyfw cpio needs to be in /boot because it must be loaded before
181 - # rootfs is mounted.
182 - use initramfs && opts+=( --write-earlyfw=${_initramfs_file} )
183 -
184 - if use split-ucode; then
185 - opts+=( --write-firmware="${ED%/}/lib/firmware/intel-ucode" )
186 - fi
187 -
188 - opts+=( "${ED%/}"/lib/firmware/intel-ucode-temp )
189 -
190 - mv "${ED%/}"/lib/firmware/intel-ucode{,-temp} || die
191 - keepdir /lib/firmware/intel-ucode
192 -
193 - iucode_tool "${opts[@]}" || die "iucode_tool ${opts[@]}"
194 -
195 - rm -r "${ED%/}"/lib/firmware/intel-ucode-temp || die
196 -
197 - elif ! use split-ucode; then # hostonly disabled
198 - rm -r "${ED%/}"/lib/firmware/intel-ucode || die
199 - fi
200 -
201 - # Because it is possible that this package will install not one single file
202 - # due to user selection which is still somehow unexpected we add the following
203 - # check to inform user so that the user has at least a chance to detect
204 - # a problem/invalid select.
205 - local _has_installed_something=
206 - if use initramfs && [[ -s "${_initramfs_file}" ]]; then
207 - _has_installed_something="yes"
208 - elif use split-ucode; then
209 - _has_installed_something=$(find "${ED%/}/lib/firmware/intel-ucode" -maxdepth 0 -not -empty -exec echo yes \;)
210 - fi
211 -
212 - if use hostonly && [[ -n "${_has_installed_something}" ]]; then
213 - elog "You only installed ucode(s) for all currently available (=online)"
214 - elog "processor(s). Remember to re-emerge this package whenever you"
215 - elog "change the system's processor model."
216 - elog ""
217 - elif [[ -z "${_has_installed_something}" ]]; then
218 - ewarn "WARNING:"
219 - if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
220 - ewarn "No ucode was installed! Because you have created this package"
221 - ewarn "using MICROCODE_SIGNATURES variable please double check if you"
222 - ewarn "have an invalid select."
223 - ewarn "It's rare but it is also possible that just no ucode update"
224 - ewarn "is available for your processor(s). In this case it is safe"
225 - ewarn "to ignore this warning."
226 - else
227 - ewarn "No ucode was installed! It's rare but it is also possible"
228 - ewarn "that just no ucode update is available for your processor(s)."
229 - ewarn "In this case it is safe to ignore this warning."
230 - fi
231 -
232 - ewarn ""
233 -
234 - if use hostonly; then
235 - ewarn "Unset \"hostonly\" USE flag to install all available ucodes."
236 - ewarn ""
237 - fi
238 - fi
239 -}
240 -
241 -pkg_prerm() {
242 - # Make sure /boot is mounted so that we can remove /boot/intel-uc.img!
243 - use initramfs && mount-boot_pkg_prerm
244 -}
245 -
246 -pkg_postrm() {
247 - # Don't forget to umount /boot if it was previously mounted by us.
248 - use initramfs && mount-boot_pkg_postrm
249 -}
250 -
251 -pkg_postinst() {
252 - # Don't forget to umount /boot if it was previously mounted by us.
253 - use initramfs && mount-boot_pkg_postinst
254 -
255 - # We cannot give detailed information if user is affected or not:
256 - # If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
257 - # to to force a specific, otherwise blacklisted, microcode. So we
258 - # only show a generic warning based on running kernel version:
259 - if kernel_is -lt 4 14 34; then
260 - ewarn "${P} contains microcode updates which require"
261 - ewarn "additional kernel patches which aren't yet included in kernel <4.14.34."
262 - ewarn "Loading such a microcode through kernel interface from an unpatched kernel"
263 - ewarn "can crash your system!"
264 - ewarn ""
265 - ewarn "Those microcodes are blacklisted per default. However, if you have altered"
266 - ewarn "MICROCODE_BLACKLIST or MICROCODE_SIGNATURES, you maybe have unintentionally"
267 - ewarn "re-enabled those microcodes...!"
268 - ewarn ""
269 - ewarn "Check \"${EROOT%/}/usr/share/doc/${PN}-*/releasenot*\" if your microcode update"
270 - ewarn "requires additional kernel patches or not."
271 - fi
272 -}
273
274 diff --git a/sys-firmware/intel-microcode/intel-microcode-20190514_p20190512.ebuild b/sys-firmware/intel-microcode/intel-microcode-20190514_p20190512.ebuild
275 deleted file mode 100644
276 index c3838387251..00000000000
277 --- a/sys-firmware/intel-microcode/intel-microcode-20190514_p20190512.ebuild
278 +++ /dev/null
279 @@ -1,248 +0,0 @@
280 -# Copyright 1999-2019 Gentoo Authors
281 -# Distributed under the terms of the GNU General Public License v2
282 -
283 -EAPI="6"
284 -
285 -inherit linux-info toolchain-funcs mount-boot
286 -
287 -# Find updates by searching and clicking the first link (hopefully it's the one):
288 -# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
289 -
290 -COLLECTION_SNAPSHOT="${PV##*_p}"
291 -INTEL_SNAPSHOT="${PV/_p*}"
292 -#NUM="28087"
293 -#https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}
294 -#https://downloadmirror.intel.com/${NUM}/eng/microcode-${INTEL_SNAPSHOT}.tgz
295 -DESCRIPTION="Intel IA32/IA64 microcode update data"
296 -HOMEPAGE="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files http://inertiawar.com/microcode/"
297 -SRC_URI="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-${INTEL_SNAPSHOT}.tar.gz
298 - https://dev.gentoo.org/~whissi/dist/intel-microcode/intel-microcode-collection-${COLLECTION_SNAPSHOT}.tar.xz"
299 -
300 -LICENSE="intel-ucode"
301 -SLOT="0"
302 -KEYWORDS="-* amd64 x86"
303 -IUSE="hostonly initramfs +split-ucode vanilla"
304 -REQUIRED_USE="|| ( initramfs split-ucode )"
305 -
306 -DEPEND="sys-apps/iucode_tool"
307 -
308 -# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
309 -RDEPEND="hostonly? ( sys-apps/iucode_tool )"
310 -
311 -RESTRICT="binchecks bindist mirror strip"
312 -
313 -S=${WORKDIR}
314 -
315 -# Blacklist bad microcode here.
316 -# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
317 -MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1"
318 -
319 -# In case we want to set some defaults ...
320 -MICROCODE_SIGNATURES_DEFAULT=""
321 -
322 -# Advanced users only!
323 -# Set MIRCOCODE_SIGNATURES to merge with:
324 -# only current CPU: MICROCODE_SIGNATURES="-S"
325 -# only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676"
326 -# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
327 -
328 -pkg_pretend() {
329 - use initramfs && mount-boot_pkg_pretend
330 -}
331 -
332 -src_prepare() {
333 - default
334 -
335 - if cd Intel-Linux-Processor-Microcode-Data* &>/dev/null; then
336 - # new tarball format from GitHub
337 - mv * ../ || die "Failed to move Intel-Linux-Processor-Microcode-Data*"
338 - cd .. || die
339 - rm -r Intel-Linux-Processor-Microcode-Data* || die
340 - fi
341 -
342 - # Prevent "invalid file format" errors from iucode_tool
343 - rm -f "${S}"/intel-ucod*/list || die
344 -}
345 -
346 -src_install() {
347 - # This will take ALL of the upstream microcode sources:
348 - # - microcode.dat
349 - # - intel-ucode/
350 - # In some cases, they have not contained the same content (eg the directory has newer stuff).
351 - MICROCODE_SRC=(
352 - "${S}"/intel-ucode/
353 - "${S}"/intel-ucode-with-caveats/
354 - )
355 -
356 - # Allow users who are scared about microcode updates not included in Intel's official
357 - # microcode tarball to opt-out and comply with Intel marketing
358 - if ! use vanilla; then
359 - MICROCODE_SRC+=( "${S}"/intel-microcode-collection-${COLLECTION_SNAPSHOT} )
360 - fi
361 -
362 - # These will carry into pkg_preinst via env saving.
363 - : ${MICROCODE_BLACKLIST=${MICROCODE_BLACKLIST_DEFAULT}}
364 - : ${MICROCODE_SIGNATURES=${MICROCODE_SIGNATUES_DEFAULT}}
365 -
366 - opts=(
367 - ${MICROCODE_BLACKLIST}
368 - ${MICROCODE_SIGNATURES}
369 - # be strict about what we are doing
370 - --overwrite
371 - --strict-checks
372 - --no-ignore-broken
373 - # we want to install latest version
374 - --no-downgrade
375 - # show everything we find
376 - --list-all
377 - # show what we selected
378 - --list
379 - )
380 -
381 - # The earlyfw cpio needs to be in /boot because it must be loaded before
382 - # rootfs is mounted.
383 - use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED%/}"/boot/intel-uc.img )
384 -
385 - keepdir /lib/firmware/intel-ucode
386 - opts+=( --write-firmware="${ED%/}/lib/firmware/intel-ucode" )
387 -
388 - iucode_tool \
389 - "${opts[@]}" \
390 - "${MICROCODE_SRC[@]}" \
391 - || die "iucode_tool ${opts[@]} ${MICROCODE_SRC[@]}"
392 -
393 - dodoc releasenote
394 -}
395 -
396 -pkg_preinst() {
397 - if [[ ${MICROCODE_BLACKLIST} != ${MICROCODE_BLACKLIST_DEFAULT} ]]; then
398 - ewarn "MICROCODE_BLACKLIST is set to \"${MICROCODE_BLACKLIST}\" instead of default \"${MICROCODE_BLACKLIST_DEFAULT}\". You are on your own!"
399 - fi
400 -
401 - if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
402 - ewarn "Package was created using advanced options:"
403 - ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${MICROCODE_SIGNATURES_DEFAULT}\"!"
404 - fi
405 -
406 - # Make sure /boot is available if needed.
407 - use initramfs && mount-boot_pkg_preinst
408 -
409 - local _initramfs_file="${ED%/}/boot/intel-uc.img"
410 -
411 - if use hostonly; then
412 - # While this output looks redundant we do this check to detect
413 - # rare cases where iucode_tool was unable to detect system's processor(s).
414 - local _detected_processors=$(iucode_tool --scan-system 2>&1)
415 - if [[ -z "${_detected_processors}" ]]; then
416 - ewarn "Looks like iucode_tool was unable to detect any processor!"
417 - else
418 - einfo "Only installing ucode(s) for ${_detected_processors#iucode_tool: system has } due to USE=hostonly ..."
419 - fi
420 -
421 - opts=(
422 - --scan-system
423 - # be strict about what we are doing
424 - --overwrite
425 - --strict-checks
426 - --no-ignore-broken
427 - # we want to install latest version
428 - --no-downgrade
429 - # show everything we find
430 - --list-all
431 - # show what we selected
432 - --list
433 - )
434 -
435 - # The earlyfw cpio needs to be in /boot because it must be loaded before
436 - # rootfs is mounted.
437 - use initramfs && opts+=( --write-earlyfw=${_initramfs_file} )
438 -
439 - if use split-ucode; then
440 - opts+=( --write-firmware="${ED%/}/lib/firmware/intel-ucode" )
441 - fi
442 -
443 - opts+=( "${ED%/}"/lib/firmware/intel-ucode-temp )
444 -
445 - mv "${ED%/}"/lib/firmware/intel-ucode{,-temp} || die
446 - keepdir /lib/firmware/intel-ucode
447 -
448 - iucode_tool "${opts[@]}" || die "iucode_tool ${opts[@]}"
449 -
450 - rm -r "${ED%/}"/lib/firmware/intel-ucode-temp || die
451 -
452 - elif ! use split-ucode; then # hostonly disabled
453 - rm -r "${ED%/}"/lib/firmware/intel-ucode || die
454 - fi
455 -
456 - # Because it is possible that this package will install not one single file
457 - # due to user selection which is still somehow unexpected we add the following
458 - # check to inform user so that the user has at least a chance to detect
459 - # a problem/invalid select.
460 - local _has_installed_something=
461 - if use initramfs && [[ -s "${_initramfs_file}" ]]; then
462 - _has_installed_something="yes"
463 - elif use split-ucode; then
464 - _has_installed_something=$(find "${ED%/}/lib/firmware/intel-ucode" -maxdepth 0 -not -empty -exec echo yes \;)
465 - fi
466 -
467 - if use hostonly && [[ -n "${_has_installed_something}" ]]; then
468 - elog "You only installed ucode(s) for all currently available (=online)"
469 - elog "processor(s). Remember to re-emerge this package whenever you"
470 - elog "change the system's processor model."
471 - elog ""
472 - elif [[ -z "${_has_installed_something}" ]]; then
473 - ewarn "WARNING:"
474 - if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
475 - ewarn "No ucode was installed! Because you have created this package"
476 - ewarn "using MICROCODE_SIGNATURES variable please double check if you"
477 - ewarn "have an invalid select."
478 - ewarn "It's rare but it is also possible that just no ucode update"
479 - ewarn "is available for your processor(s). In this case it is safe"
480 - ewarn "to ignore this warning."
481 - else
482 - ewarn "No ucode was installed! It's rare but it is also possible"
483 - ewarn "that just no ucode update is available for your processor(s)."
484 - ewarn "In this case it is safe to ignore this warning."
485 - fi
486 -
487 - ewarn ""
488 -
489 - if use hostonly; then
490 - ewarn "Unset \"hostonly\" USE flag to install all available ucodes."
491 - ewarn ""
492 - fi
493 - fi
494 -}
495 -
496 -pkg_prerm() {
497 - # Make sure /boot is mounted so that we can remove /boot/intel-uc.img!
498 - use initramfs && mount-boot_pkg_prerm
499 -}
500 -
501 -pkg_postrm() {
502 - # Don't forget to umount /boot if it was previously mounted by us.
503 - use initramfs && mount-boot_pkg_postrm
504 -}
505 -
506 -pkg_postinst() {
507 - # Don't forget to umount /boot if it was previously mounted by us.
508 - use initramfs && mount-boot_pkg_postinst
509 -
510 - # We cannot give detailed information if user is affected or not:
511 - # If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
512 - # to to force a specific, otherwise blacklisted, microcode. So we
513 - # only show a generic warning based on running kernel version:
514 - if kernel_is -lt 4 14 34; then
515 - ewarn "${P} contains microcode updates which require"
516 - ewarn "additional kernel patches which aren't yet included in kernel <4.14.34."
517 - ewarn "Loading such a microcode through kernel interface from an unpatched kernel"
518 - ewarn "can crash your system!"
519 - ewarn ""
520 - ewarn "Those microcodes are blacklisted per default. However, if you have altered"
521 - ewarn "MICROCODE_BLACKLIST or MICROCODE_SIGNATURES, you maybe have unintentionally"
522 - ewarn "re-enabled those microcodes...!"
523 - ewarn ""
524 - ewarn "Check \"${EROOT%/}/usr/share/doc/${PN}-*/releasenot*\" if your microcode update"
525 - ewarn "requires additional kernel patches or not."
526 - fi
527 -}