From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/
Date: Tue, 29 May 2018 23:15:20 +0000 (UTC) [thread overview]
Message-ID: <1527635711.3eacfe4274c5d0c8a69911df89525324697c6328.whissi@gentoo> (raw)
commit: 3eacfe4274c5d0c8a69911df89525324697c6328
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue May 29 23:14:42 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 29 23:15:11 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3eacfe42
sys-firmware/intel-microcode: Add "minimal" USE flag
Due to previous change (commit eb9036f6f998c91c6bc021f73bc10ca1b5240ae7),
this package can become very large (or the resulting initramfs).
While the already introduced environment variable "MICROCODE_SIGNATURES" is
allowing you to set iucode_tool's "--scan-system" parameter to only
install ucode(s) supported by the currently available (=online) processor(s),
this doesn't work for binary package user(s).
The now added "minimal" USE flag (enabled by default) will set "--scan-system"
parameter for you. This will still allow you to select/blacklist ucode(s)
for all your hosts on your central build host using the "MICROCODE_SIGNATURES"
variable like before while giving each host the opportunity to only install
really supported ucode(s) which will reduces the file size of the resulting
initramfs.
Bug: https://bugs.gentoo.org/654638
Package-Manager: Portage-2.3.40, Repoman-2.3.9
...1.ebuild => intel-microcode-20180426-r2.ebuild} | 58 ++++++++++++++++++++--
sys-firmware/intel-microcode/metadata.xml | 1 +
2 files changed, 55 insertions(+), 4 deletions(-)
diff --git a/sys-firmware/intel-microcode/intel-microcode-20180426-r1.ebuild b/sys-firmware/intel-microcode/intel-microcode-20180426-r2.ebuild
similarity index 70%
rename from sys-firmware/intel-microcode/intel-microcode-20180426-r1.ebuild
rename to sys-firmware/intel-microcode/intel-microcode-20180426-r2.ebuild
index 29a6958681d..b39f2be9bd8 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20180426-r1.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20180426-r2.ebuild
@@ -19,11 +19,14 @@ SRC_URI="https://downloadmirror.intel.com/${NUM}/eng/microcode-${INTEL_SNAPSHOT}
LICENSE="intel-ucode"
SLOT="0"
KEYWORDS=""
-IUSE="initramfs +split-ucode vanilla"
+IUSE="initramfs +minimal +split-ucode vanilla"
REQUIRED_USE="|| ( initramfs split-ucode )"
DEPEND="sys-apps/iucode_tool"
-RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586
+
+# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
+RDEPEND="!<sys-apps/microcode-ctl-1.17-r2
+ minimal? ( sys-apps/iucode_tool )"
S=${WORKDIR}
@@ -96,8 +99,9 @@ src_install() {
# The earlyfw cpio needs to be in /boot because it must be loaded before
# rootfs is mounted.
use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED%/}"/boot/intel-uc.img )
- # split location:
- use split-ucode && dodir /lib/firmware/intel-ucode && opts+=( --write-firmware="${ED%/}"/lib/firmware/intel-ucode )
+ # split location (we use a temporary location so that we are able
+ # to re-run iucode_tool in pkg_preinst):
+ dodir /tmp/intel-ucode && opts+=( --write-firmware="${ED%/}"/tmp/intel-ucode )
iucode_tool \
"${opts[@]}" \
@@ -109,6 +113,45 @@ src_install() {
pkg_preinst() {
use initramfs && mount-boot_pkg_preinst
+
+ if use minimal; then
+ einfo "Removing ucode(s) not supported by any currently available (=online) processor(s) due to USE=minimal ..."
+ opts=(
+ --scan-system
+ # be strict about what we are doing
+ --overwrite
+ --strict-checks
+ --no-ignore-broken
+ # we want to install latest version
+ --no-downgrade
+ # show everything we find
+ --list-all
+ # show what we selected
+ --list
+ )
+
+ # The earlyfw cpio needs to be in /boot because it must be loaded before
+ # rootfs is mounted.
+ use initramfs && opts+=( --write-earlyfw="${ED%/}"/boot/intel-uc.img )
+ # split location:
+ use split-ucode && dodir /lib/firmware/intel-ucode && opts+=( --write-firmware="${ED%/}"/lib/firmware/intel-ucode )
+
+ iucode_tool \
+ "${opts[@]}" \
+ "${ED%/}"/tmp/intel-ucode \
+ || die "iucode_tool ${opts[@]} ${ED%/}/tmp/intel-ucode"
+
+ else
+ if use split-ucode; then
+ # Temporary /tmp/intel-ucode will become final /lib/firmware/intel-ucode ...
+ dodir /lib/firmware/intel-ucode
+ mv "${ED%/}"/tmp/intel-ucode "${ED%/}"/lib/firmware/intel-ucode || die "Failed to install splitted ucodes!"
+ fi
+ fi
+
+ # Cleanup any temporary leftovers so that we don't merge any
+ # unneeded files on disk
+ rm -r "${ED%/}"/tmp || die "Failed to cleanup '"${ED%/}"/tmp'"
}
pkg_prerm() {
@@ -122,6 +165,13 @@ pkg_postrm() {
pkg_postinst() {
use initramfs && mount-boot_pkg_postinst
+ if use minimal; then
+ elog "You only installed ucodes for all currently available (=online)"
+ elog "processor(s). Remember to re-emerge this package whenever you"
+ elog "change the system's processor model."
+ elog ""
+ fi
+
# We cannot give detailed information if user is affected or not:
# If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
# to to force a specific, otherwise blacklisted, microcode. So we
diff --git a/sys-firmware/intel-microcode/metadata.xml b/sys-firmware/intel-microcode/metadata.xml
index 2d96b231657..593b3a92123 100644
--- a/sys-firmware/intel-microcode/metadata.xml
+++ b/sys-firmware/intel-microcode/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="initramfs">install a small initramfs for use with CONFIG_MICROCODE_EARLY</flag>
+ <flag name="minimal">only install ucode(s) supported by currently available (=online) processor(s)</flag>
<flag name="monolithic">install the large text microcode.dat (used by older kernels via microcode_ctl)</flag>
<flag name="split-ucode">install the split binary ucode files (used by the kernel directly)</flag>
<flag name="vanilla">install only microcode updates from Intel's official microcode tarball</flag>
next reply other threads:[~2018-05-29 23:15 UTC|newest]
Thread overview: 181+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 23:15 Thomas Deutschmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-03 17:47 [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/ Nowa Ammerlaan
2025-02-15 14:20 Mike Pagano
2025-02-11 18:37 Mike Pagano
2025-02-11 18:37 Mike Pagano
2025-01-06 20:25 Nowa Ammerlaan
2024-11-26 15:09 Mike Pagano
2024-11-26 15:09 Mike Pagano
2024-11-14 20:41 Mike Pagano
2024-11-13 12:48 Mike Pagano
2024-10-20 18:10 Mike Pagano
2024-10-03 21:18 Mike Pagano
2024-09-15 16:26 Mike Pagano
2024-09-07 18:31 Mike Pagano
2024-09-07 18:31 Mike Pagano
2024-08-15 22:21 Mike Pagano
2024-06-29 8:39 Andrew Ammerlaan
2024-06-26 18:58 Arthur Zamarin
2024-06-26 17:53 Arthur Zamarin
2024-06-01 2:55 Sam James
2024-06-01 2:11 Sam James
2024-06-01 1:00 Sam James
2024-05-17 12:07 Andrew Ammerlaan
2024-05-15 12:49 Sam James
2024-05-15 12:49 Sam James
2024-05-04 9:48 Arthur Zamarin
2024-05-04 7:20 Arthur Zamarin
2024-03-12 20:25 Mike Pagano
2023-11-17 15:09 Sam James
2023-11-17 13:54 Mike Pagano
2023-11-14 23:41 Mike Pagano
2023-11-12 12:20 Sam James
2023-11-12 8:20 Arthur Zamarin
2023-10-11 16:40 Mike Pagano
2023-08-09 3:20 Sam James
2023-08-08 18:46 Sam James
2023-07-24 4:15 Sam James
2023-06-15 23:44 Sam James
2023-06-15 16:55 Sam James
2023-06-10 13:35 Sam James
2023-06-10 13:35 Sam James
2023-05-12 23:14 Mike Pagano
2023-03-22 5:27 Sam James
2023-03-22 5:27 Sam James
2023-02-15 9:30 Sam James
2023-02-15 1:39 Sam James
2022-12-16 6:28 Sam James
2022-11-09 7:55 Sam James
2022-11-09 3:20 Sam James
2022-08-19 3:38 Sam James
2022-08-10 17:08 Mike Pagano
2022-08-10 17:08 Mike Pagano
2022-08-10 17:07 Mike Pagano
2022-08-10 17:07 Mike Pagano
2022-08-10 17:05 Mike Pagano
2022-08-10 16:24 Mike Pagano
2022-08-10 16:23 Mike Pagano
2022-08-09 22:01 Mike Pagano
2022-08-09 20:43 Mike Pagano
2022-05-10 20:24 Mike Pagano
2022-05-02 20:46 Mike Pagano
2022-03-16 6:33 Ulrich Müller
2022-03-15 20:19 Sam James
2022-02-10 2:02 Thomas Deutschmann
2021-08-30 16:03 Thomas Deutschmann
2021-06-08 22:23 Thomas Deutschmann
2021-05-14 14:58 Thomas Deutschmann
2021-02-21 3:16 Thomas Deutschmann
2020-11-18 23:35 Thomas Deutschmann
2020-11-18 23:35 Thomas Deutschmann
2020-11-15 23:50 Thomas Deutschmann
2020-11-11 1:17 Thomas Deutschmann
2020-09-20 23:41 Thomas Deutschmann
2020-06-29 11:20 Thomas Deutschmann
2020-06-17 16:12 Thomas Deutschmann
2020-06-17 16:12 Thomas Deutschmann
2020-06-14 22:12 Thomas Deutschmann
2020-06-14 22:12 Thomas Deutschmann
2020-06-10 0:59 Thomas Deutschmann
2020-06-10 0:59 Thomas Deutschmann
2020-06-01 22:11 Thomas Deutschmann
2020-06-01 22:11 Thomas Deutschmann
2020-05-08 23:05 Thomas Deutschmann
2020-05-08 23:05 Thomas Deutschmann
2020-04-28 22:26 Thomas Deutschmann
2020-04-28 22:26 Thomas Deutschmann
2020-02-09 14:07 Thomas Deutschmann
2020-02-09 14:07 Thomas Deutschmann
2019-11-15 22:58 Thomas Deutschmann
2019-11-12 21:31 Thomas Deutschmann
2019-11-10 18:48 Thomas Deutschmann
2019-11-10 18:48 Thomas Deutschmann
2019-09-19 18:33 Thomas Deutschmann
2019-09-08 13:34 Thomas Deutschmann
2019-09-08 13:17 Thomas Deutschmann
2019-08-19 21:16 Thomas Deutschmann
2019-08-19 21:16 Thomas Deutschmann
2019-07-22 16:34 Thomas Deutschmann
2019-06-24 21:57 Thomas Deutschmann
2019-06-24 21:57 Thomas Deutschmann
2019-06-10 20:06 Thomas Deutschmann
2019-06-10 20:06 Thomas Deutschmann
2019-05-26 10:09 Thomas Deutschmann
2019-05-26 10:09 Thomas Deutschmann
2019-05-14 18:24 Thomas Deutschmann
2019-05-13 1:57 Thomas Deutschmann
2019-05-13 1:57 Thomas Deutschmann
2019-04-24 22:27 Thomas Deutschmann
2019-04-24 22:27 Thomas Deutschmann
2019-03-13 22:39 Thomas Deutschmann
2019-03-13 22:39 Thomas Deutschmann
2019-02-04 10:58 Thomas Deutschmann
2019-02-04 10:58 Thomas Deutschmann
2019-01-14 2:39 Thomas Deutschmann
2019-01-14 2:39 Thomas Deutschmann
2018-12-16 23:19 Thomas Deutschmann
2018-11-17 23:56 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-09 11:36 Mikle Kolyada
2018-08-24 19:40 Thomas Deutschmann
2018-08-24 19:40 Thomas Deutschmann
2018-08-23 17:17 Matt Thode
2018-08-08 23:46 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-24 12:31 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-08 21:51 Thomas Deutschmann
2018-07-08 21:51 Thomas Deutschmann
2018-07-06 1:04 Thomas Deutschmann
2018-06-23 11:46 Thomas Deutschmann
2018-06-19 13:46 Thomas Deutschmann
2018-06-07 0:02 Thomas Deutschmann
2018-06-02 10:26 Thomas Deutschmann
2018-05-30 22:41 Thomas Deutschmann
2018-05-30 12:57 Thomas Deutschmann
2018-05-29 23:18 Thomas Deutschmann
2018-05-24 12:30 Thomas Deutschmann
2018-05-23 18:24 Thomas Deutschmann
2018-04-13 23:22 Aaron Bauman
2018-03-15 14:13 Thomas Deutschmann
2018-03-14 11:02 Thomas Deutschmann
2018-02-07 3:26 Thomas Deutschmann
2018-02-07 3:26 Thomas Deutschmann
2018-01-12 19:27 Thomas Deutschmann
2018-01-12 18:53 Mike Gilbert
2018-01-10 22:14 Robin H. Johnson
2018-01-10 0:46 Thomas Deutschmann
2018-01-10 0:46 Thomas Deutschmann
2018-01-07 21:41 Agostino Sarubbo
2018-01-07 21:41 Agostino Sarubbo
2018-01-07 20:48 Thomas Deutschmann
2018-01-06 17:53 Agostino Sarubbo
2018-01-04 16:25 Thomas Deutschmann
2017-11-21 20:08 Thomas Deutschmann
2017-07-14 7:13 Matt Turner
2017-07-04 15:49 Agostino Sarubbo
2017-07-04 10:17 Agostino Sarubbo
2017-06-05 21:23 Robin H. Johnson
2016-12-21 11:23 Thomas Deutschmann
2016-12-20 12:50 Tobias Klausmann
2016-11-24 20:17 Markos Chandras
2016-09-27 13:44 Tony Vroon
2016-06-24 20:12 Doug Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1527635711.3eacfe4274c5d0c8a69911df89525324697c6328.whissi@gentoo \
--to=whissi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox