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