1 |
commit: 01f51ff987a22f03d28959d43474af58c3b1492b |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 1 22:10:54 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 1 22:11:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01f51ff9 |
7 |
|
8 |
sys-firmware/intel-microcode: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
sys-firmware/intel-microcode/Manifest | 2 - |
14 |
.../intel-microcode-20200508_p20200508.ebuild | 248 --------------------- |
15 |
2 files changed, 250 deletions(-) |
16 |
|
17 |
diff --git a/sys-firmware/intel-microcode/Manifest b/sys-firmware/intel-microcode/Manifest |
18 |
index f02a25cc671..37862ea8457 100644 |
19 |
--- a/sys-firmware/intel-microcode/Manifest |
20 |
+++ b/sys-firmware/intel-microcode/Manifest |
21 |
@@ -1,4 +1,2 @@ |
22 |
-DIST intel-microcode-collection-20200508.tar.xz 6010560 BLAKE2B ebbbac3b474644d983f8f6f1a3b305b60a65732883658d18efe8c918f6d1ec55f8439313ccc2fe5d90a5ca5e207bcc2db9b9299148157f233007046fa3090e19 SHA512 48dde26041afb3a82afd3f4f8a2539ccf0da4a42c802b45aa776e16ceebf72cb39ce828278a423d4f2b2c0d7c29c5701978b4a223d135b453bc63cb1db3e5373 |
23 |
DIST intel-microcode-collection-20200601.tar.xz 6163976 BLAKE2B eb17605a09f771562189924b916b0d2426d6c2b6f9d76447d05d614679f097acf71fc70dd96132c0ad9d3f1a954f5809456fa951ca42fa0db2373da2288417b7 SHA512 60e798dd357ce85d8bd1f78e0447d983d6916aec87bf8a3f375091e4c57ffa8fb654459a8ed7d2d83184a828060509e16aa37e3a23f70684ac1b170736a12d54 |
24 |
-DIST microcode-20200508.tar.gz 3002932 BLAKE2B 01964ca9cf6f3d0255d85d6bff9c8fedb127884a034d34eeec97e24d6689aa81eba758306316346cd686d2aee6c0cbc4afc0a2ccb49c3a4b2c5f0d6b1e543063 SHA512 00fa15464c7637c080c49d63b73c197418f4709eaaf55d515504f3bb8aab06dc97206c4fbef57250dc6ca8abf226e0f1fc39bad76ca8b0d705c820e3d1d8ffc9 |
25 |
DIST microcode-20200520.tar.gz 3002980 BLAKE2B 5f91536e558827e5c412e336596d21c9aa9365e83ee9c96a9bcda9abbc3921c623e489f6e42be689203a1caa99cb6334b3124bf26764e4e1a4afe83de00aab3d SHA512 39e434406a0e855da911a4259691b9f60f4d205d8f0fbf47564a811c6317919fb7458ddf38a3a7922a3d06373a31f55e72069561c5d57e213702e2005579cf12 |
26 |
|
27 |
diff --git a/sys-firmware/intel-microcode/intel-microcode-20200508_p20200508.ebuild b/sys-firmware/intel-microcode/intel-microcode-20200508_p20200508.ebuild |
28 |
deleted file mode 100644 |
29 |
index 0a7fafc268d..00000000000 |
30 |
--- a/sys-firmware/intel-microcode/intel-microcode-20200508_p20200508.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,248 +0,0 @@ |
33 |
-# Copyright 1999-2020 Gentoo Authors |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI="7" |
37 |
- |
38 |
-inherit linux-info toolchain-funcs mount-boot |
39 |
- |
40 |
-# Find updates by searching and clicking the first link (hopefully it's the one): |
41 |
-# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File |
42 |
- |
43 |
-COLLECTION_SNAPSHOT="${PV##*_p}" |
44 |
-INTEL_SNAPSHOT="${PV/_p*}" |
45 |
-#NUM="28087" |
46 |
-#https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM} |
47 |
-#https://downloadmirror.intel.com/${NUM}/eng/microcode-${INTEL_SNAPSHOT}.tgz |
48 |
-DESCRIPTION="Intel IA32/IA64 microcode update data" |
49 |
-HOMEPAGE="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files http://inertiawar.com/microcode/" |
50 |
-SRC_URI="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-${INTEL_SNAPSHOT}.tar.gz |
51 |
- https://dev.gentoo.org/~whissi/dist/intel-microcode/intel-microcode-collection-${COLLECTION_SNAPSHOT}.tar.xz" |
52 |
- |
53 |
-LICENSE="intel-ucode" |
54 |
-SLOT="0" |
55 |
-KEYWORDS="-* amd64 x86" |
56 |
-IUSE="hostonly initramfs +split-ucode vanilla" |
57 |
-REQUIRED_USE="|| ( initramfs split-ucode )" |
58 |
- |
59 |
-BDEPEND="sys-apps/iucode_tool" |
60 |
- |
61 |
-# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586 |
62 |
-RDEPEND="hostonly? ( sys-apps/iucode_tool )" |
63 |
- |
64 |
-RESTRICT="binchecks bindist mirror strip" |
65 |
- |
66 |
-S=${WORKDIR} |
67 |
- |
68 |
-# Blacklist bad microcode here. |
69 |
-# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader |
70 |
-MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1" |
71 |
- |
72 |
-# In case we want to set some defaults ... |
73 |
-MICROCODE_SIGNATURES_DEFAULT="" |
74 |
- |
75 |
-# Advanced users only! |
76 |
-# Set MIRCOCODE_SIGNATURES to merge with: |
77 |
-# only current CPU: MICROCODE_SIGNATURES="-S" |
78 |
-# only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676" |
79 |
-# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686" |
80 |
- |
81 |
-pkg_pretend() { |
82 |
- use initramfs && mount-boot_pkg_pretend |
83 |
-} |
84 |
- |
85 |
-src_prepare() { |
86 |
- default |
87 |
- |
88 |
- if cd Intel-Linux-Processor-Microcode-Data* &>/dev/null; then |
89 |
- # new tarball format from GitHub |
90 |
- mv * ../ || die "Failed to move Intel-Linux-Processor-Microcode-Data*" |
91 |
- cd .. || die |
92 |
- rm -r Intel-Linux-Processor-Microcode-Data* || die |
93 |
- fi |
94 |
- |
95 |
- # Prevent "invalid file format" errors from iucode_tool |
96 |
- rm -f "${S}"/intel-ucod*/list || die |
97 |
-} |
98 |
- |
99 |
-src_install() { |
100 |
- # This will take ALL of the upstream microcode sources: |
101 |
- # - microcode.dat |
102 |
- # - intel-ucode/ |
103 |
- # In some cases, they have not contained the same content (eg the directory has newer stuff). |
104 |
- MICROCODE_SRC=( |
105 |
- "${S}"/intel-ucode/ |
106 |
- "${S}"/intel-ucode-with-caveats/ |
107 |
- ) |
108 |
- |
109 |
- # Allow users who are scared about microcode updates not included in Intel's official |
110 |
- # microcode tarball to opt-out and comply with Intel marketing |
111 |
- if ! use vanilla; then |
112 |
- MICROCODE_SRC+=( "${S}"/intel-microcode-collection-${COLLECTION_SNAPSHOT} ) |
113 |
- fi |
114 |
- |
115 |
- # These will carry into pkg_preinst via env saving. |
116 |
- : ${MICROCODE_BLACKLIST=${MICROCODE_BLACKLIST_DEFAULT}} |
117 |
- : ${MICROCODE_SIGNATURES=${MICROCODE_SIGNATUES_DEFAULT}} |
118 |
- |
119 |
- opts=( |
120 |
- ${MICROCODE_BLACKLIST} |
121 |
- ${MICROCODE_SIGNATURES} |
122 |
- # be strict about what we are doing |
123 |
- --overwrite |
124 |
- --strict-checks |
125 |
- --no-ignore-broken |
126 |
- # we want to install latest version |
127 |
- --no-downgrade |
128 |
- # show everything we find |
129 |
- --list-all |
130 |
- # show what we selected |
131 |
- --list |
132 |
- ) |
133 |
- |
134 |
- # The earlyfw cpio needs to be in /boot because it must be loaded before |
135 |
- # rootfs is mounted. |
136 |
- use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" ) |
137 |
- |
138 |
- keepdir /lib/firmware/intel-ucode |
139 |
- opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" ) |
140 |
- |
141 |
- iucode_tool \ |
142 |
- "${opts[@]}" \ |
143 |
- "${MICROCODE_SRC[@]}" \ |
144 |
- || die "iucode_tool ${opts[@]} ${MICROCODE_SRC[@]}" |
145 |
- |
146 |
- dodoc releasenote |
147 |
-} |
148 |
- |
149 |
-pkg_preinst() { |
150 |
- if [[ ${MICROCODE_BLACKLIST} != ${MICROCODE_BLACKLIST_DEFAULT} ]]; then |
151 |
- ewarn "MICROCODE_BLACKLIST is set to \"${MICROCODE_BLACKLIST}\" instead of default \"${MICROCODE_BLACKLIST_DEFAULT}\". You are on your own!" |
152 |
- fi |
153 |
- |
154 |
- if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then |
155 |
- ewarn "Package was created using advanced options:" |
156 |
- ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${MICROCODE_SIGNATURES_DEFAULT}\"!" |
157 |
- fi |
158 |
- |
159 |
- # Make sure /boot is available if needed. |
160 |
- use initramfs && mount-boot_pkg_preinst |
161 |
- |
162 |
- local _initramfs_file="${ED}/boot/intel-uc.img" |
163 |
- |
164 |
- if use hostonly; then |
165 |
- # While this output looks redundant we do this check to detect |
166 |
- # rare cases where iucode_tool was unable to detect system's processor(s). |
167 |
- local _detected_processors=$(iucode_tool --scan-system 2>&1) |
168 |
- if [[ -z "${_detected_processors}" ]]; then |
169 |
- ewarn "Looks like iucode_tool was unable to detect any processor!" |
170 |
- else |
171 |
- einfo "Only installing ucode(s) for ${_detected_processors#iucode_tool: system has } due to USE=hostonly ..." |
172 |
- fi |
173 |
- |
174 |
- opts=( |
175 |
- --scan-system |
176 |
- # be strict about what we are doing |
177 |
- --overwrite |
178 |
- --strict-checks |
179 |
- --no-ignore-broken |
180 |
- # we want to install latest version |
181 |
- --no-downgrade |
182 |
- # show everything we find |
183 |
- --list-all |
184 |
- # show what we selected |
185 |
- --list |
186 |
- ) |
187 |
- |
188 |
- # The earlyfw cpio needs to be in /boot because it must be loaded before |
189 |
- # rootfs is mounted. |
190 |
- use initramfs && opts+=( --write-earlyfw=${_initramfs_file} ) |
191 |
- |
192 |
- if use split-ucode; then |
193 |
- opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" ) |
194 |
- fi |
195 |
- |
196 |
- opts+=( "${ED}/lib/firmware/intel-ucode-temp" ) |
197 |
- |
198 |
- mv "${ED}"/lib/firmware/intel-ucode{,-temp} || die |
199 |
- keepdir /lib/firmware/intel-ucode |
200 |
- |
201 |
- iucode_tool "${opts[@]}" || die "iucode_tool ${opts[@]}" |
202 |
- |
203 |
- rm -r "${ED}"/lib/firmware/intel-ucode-temp || die |
204 |
- |
205 |
- elif ! use split-ucode; then # hostonly disabled |
206 |
- rm -r "${ED}"/lib/firmware/intel-ucode || die |
207 |
- fi |
208 |
- |
209 |
- # Because it is possible that this package will install not one single file |
210 |
- # due to user selection which is still somehow unexpected we add the following |
211 |
- # check to inform user so that the user has at least a chance to detect |
212 |
- # a problem/invalid select. |
213 |
- local _has_installed_something= |
214 |
- if use initramfs && [[ -s "${_initramfs_file}" ]]; then |
215 |
- _has_installed_something="yes" |
216 |
- elif use split-ucode; then |
217 |
- _has_installed_something=$(find "${ED}/lib/firmware/intel-ucode" -maxdepth 0 -not -empty -exec echo yes \;) |
218 |
- fi |
219 |
- |
220 |
- if use hostonly && [[ -n "${_has_installed_something}" ]]; then |
221 |
- elog "You only installed ucode(s) for all currently available (=online)" |
222 |
- elog "processor(s). Remember to re-emerge this package whenever you" |
223 |
- elog "change the system's processor model." |
224 |
- elog "" |
225 |
- elif [[ -z "${_has_installed_something}" ]]; then |
226 |
- ewarn "WARNING:" |
227 |
- if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then |
228 |
- ewarn "No ucode was installed! Because you have created this package" |
229 |
- ewarn "using MICROCODE_SIGNATURES variable please double check if you" |
230 |
- ewarn "have an invalid select." |
231 |
- ewarn "It's rare but it is also possible that just no ucode update" |
232 |
- ewarn "is available for your processor(s). In this case it is safe" |
233 |
- ewarn "to ignore this warning." |
234 |
- else |
235 |
- ewarn "No ucode was installed! It's rare but it is also possible" |
236 |
- ewarn "that just no ucode update is available for your processor(s)." |
237 |
- ewarn "In this case it is safe to ignore this warning." |
238 |
- fi |
239 |
- |
240 |
- ewarn "" |
241 |
- |
242 |
- if use hostonly; then |
243 |
- ewarn "Unset \"hostonly\" USE flag to install all available ucodes." |
244 |
- ewarn "" |
245 |
- fi |
246 |
- fi |
247 |
-} |
248 |
- |
249 |
-pkg_prerm() { |
250 |
- # Make sure /boot is mounted so that we can remove /boot/intel-uc.img! |
251 |
- use initramfs && mount-boot_pkg_prerm |
252 |
-} |
253 |
- |
254 |
-pkg_postrm() { |
255 |
- # Don't forget to umount /boot if it was previously mounted by us. |
256 |
- use initramfs && mount-boot_pkg_postrm |
257 |
-} |
258 |
- |
259 |
-pkg_postinst() { |
260 |
- # Don't forget to umount /boot if it was previously mounted by us. |
261 |
- use initramfs && mount-boot_pkg_postinst |
262 |
- |
263 |
- # We cannot give detailed information if user is affected or not: |
264 |
- # If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES |
265 |
- # to to force a specific, otherwise blacklisted, microcode. So we |
266 |
- # only show a generic warning based on running kernel version: |
267 |
- if kernel_is -lt 4 14 34; then |
268 |
- ewarn "${P} contains microcode updates which require" |
269 |
- ewarn "additional kernel patches which aren't yet included in kernel <4.14.34." |
270 |
- ewarn "Loading such a microcode through kernel interface from an unpatched kernel" |
271 |
- ewarn "can crash your system!" |
272 |
- ewarn "" |
273 |
- ewarn "Those microcodes are blacklisted per default. However, if you have altered" |
274 |
- ewarn "MICROCODE_BLACKLIST or MICROCODE_SIGNATURES, you maybe have unintentionally" |
275 |
- ewarn "re-enabled those microcodes...!" |
276 |
- ewarn "" |
277 |
- ewarn "Check \"${EROOT}/usr/share/doc/${PN}-*/releasenot*\" if your microcode update" |
278 |
- ewarn "requires additional kernel patches or not." |
279 |
- fi |
280 |
-} |