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