Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | # |
| 2 | # SPDX-License-Identifier: GPL-2.0-only |
| 3 | # |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | import bb.siggen |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 5 | import bb.runqueue |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 6 | import oe |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 8 | def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCaches): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | # Return True if we should keep the dependency, False to drop it |
| 10 | def isNative(x): |
| 11 | return x.endswith("-native") |
| 12 | def isCross(x): |
| 13 | return "-cross-" in x |
| 14 | def isNativeSDK(x): |
| 15 | return x.startswith("nativesdk-") |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 16 | def isKernel(mc, fn): |
| 17 | inherits = " ".join(dataCaches[mc].inherits[fn]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | return inherits.find("/module-base.bbclass") != -1 or inherits.find("/linux-kernel-base.bbclass") != -1 |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 19 | def isPackageGroup(mc, fn): |
| 20 | inherits = " ".join(dataCaches[mc].inherits[fn]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | return "/packagegroup.bbclass" in inherits |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 22 | def isAllArch(mc, fn): |
| 23 | inherits = " ".join(dataCaches[mc].inherits[fn]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 24 | return "/allarch.bbclass" in inherits |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 25 | def isImage(mc, fn): |
| 26 | return "/image.bbclass" in " ".join(dataCaches[mc].inherits[fn]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 28 | depmc, _, deptaskname, depmcfn = bb.runqueue.split_tid_mcfn(dep) |
| 29 | mc, _ = bb.runqueue.split_mc(fn) |
| 30 | |
| 31 | # (Almost) always include our own inter-task dependencies (unless it comes |
| 32 | # from a mcdepends). The exception is the special |
| 33 | # do_kernel_configme->do_unpack_and_patch dependency from archiver.bbclass. |
| 34 | if recipename == depname and depmc == mc: |
| 35 | if task == "do_kernel_configme" and deptaskname == "do_unpack_and_patch": |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 36 | return False |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | return True |
| 38 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 39 | # Exclude well defined recipe->dependency |
| 40 | if "%s->%s" % (recipename, depname) in siggen.saferecipedeps: |
| 41 | return False |
| 42 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | # Check for special wildcard |
| 44 | if "*->%s" % depname in siggen.saferecipedeps and recipename != depname: |
| 45 | return False |
| 46 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | # Don't change native/cross/nativesdk recipe dependencies any further |
| 48 | if isNative(recipename) or isCross(recipename) or isNativeSDK(recipename): |
| 49 | return True |
| 50 | |
| 51 | # Only target packages beyond here |
| 52 | |
| 53 | # allarch packagegroups are assumed to have well behaved names which don't change between architecures/tunes |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 54 | if isPackageGroup(mc, fn) and isAllArch(mc, fn) and not isNative(depname): |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 55 | return False |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 56 | |
| 57 | # Exclude well defined machine specific configurations which don't change ABI |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 58 | if depname in siggen.abisaferecipes and not isImage(mc, fn): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 59 | return False |
| 60 | |
| 61 | # Kernel modules are well namespaced. We don't want to depend on the kernel's checksum |
| 62 | # if we're just doing an RRECOMMENDS_xxx = "kernel-module-*", not least because the checksum |
| 63 | # is machine specific. |
| 64 | # Therefore if we're not a kernel or a module recipe (inheriting the kernel classes) |
| 65 | # and we reccomend a kernel-module, we exclude the dependency. |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 66 | if dataCaches and isKernel(depmc, depmcfn) and not isKernel(mc, fn): |
| 67 | for pkg in dataCaches[mc].runrecs[fn]: |
| 68 | if " ".join(dataCaches[mc].runrecs[fn][pkg]).find("kernel-module-") != -1: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 69 | return False |
| 70 | |
| 71 | # Default to keep dependencies |
| 72 | return True |
| 73 | |
| 74 | def sstate_lockedsigs(d): |
| 75 | sigs = {} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 76 | types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES") or "").split() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 77 | for t in types: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 78 | siggen_lockedsigs_var = "SIGGEN_LOCKEDSIGS_%s" % t |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 79 | lockedsigs = (d.getVar(siggen_lockedsigs_var) or "").split() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 80 | for ls in lockedsigs: |
| 81 | pn, task, h = ls.split(":", 2) |
| 82 | if pn not in sigs: |
| 83 | sigs[pn] = {} |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 84 | sigs[pn][task] = [h, siggen_lockedsigs_var] |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 85 | return sigs |
| 86 | |
| 87 | class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic): |
| 88 | name = "OEBasic" |
| 89 | def init_rundepcheck(self, data): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 90 | self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split() |
| 91 | self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 92 | pass |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 93 | def rundep_check(self, fn, recipename, task, dep, depname, dataCaches = None): |
| 94 | return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCaches) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 95 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 96 | class SignatureGeneratorOEBasicHashMixIn(object): |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 97 | supports_multiconfig_datacaches = True |
| 98 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 99 | def init_rundepcheck(self, data): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 100 | self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split() |
| 101 | self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 102 | self.lockedsigs = sstate_lockedsigs(data) |
| 103 | self.lockedhashes = {} |
| 104 | self.lockedpnmap = {} |
| 105 | self.lockedhashfn = {} |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 106 | self.machine = data.getVar("MACHINE") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 107 | self.mismatch_msgs = [] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 108 | self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES") or |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 109 | "").split() |
| 110 | self.unlockedrecipes = { k: "" for k in self.unlockedrecipes } |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 111 | self.buildarch = data.getVar('BUILD_ARCH') |
| 112 | self._internal = False |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 113 | pass |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 114 | |
| 115 | def tasks_resolved(self, virtmap, virtpnmap, dataCache): |
| 116 | # Translate virtual/xxx entries to PN values |
| 117 | newabisafe = [] |
| 118 | for a in self.abisaferecipes: |
| 119 | if a in virtpnmap: |
| 120 | newabisafe.append(virtpnmap[a]) |
| 121 | else: |
| 122 | newabisafe.append(a) |
| 123 | self.abisaferecipes = newabisafe |
| 124 | newsafedeps = [] |
| 125 | for a in self.saferecipedeps: |
| 126 | a1, a2 = a.split("->") |
| 127 | if a1 in virtpnmap: |
| 128 | a1 = virtpnmap[a1] |
| 129 | if a2 in virtpnmap: |
| 130 | a2 = virtpnmap[a2] |
| 131 | newsafedeps.append(a1 + "->" + a2) |
| 132 | self.saferecipedeps = newsafedeps |
| 133 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 134 | def rundep_check(self, fn, recipename, task, dep, depname, dataCaches = None): |
| 135 | return sstate_rundepfilter(self, fn, recipename, task, dep, depname, dataCaches) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 136 | |
| 137 | def get_taskdata(self): |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 138 | return (self.lockedpnmap, self.lockedhashfn, self.lockedhashes) + super().get_taskdata() |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 139 | |
| 140 | def set_taskdata(self, data): |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 141 | self.lockedpnmap, self.lockedhashfn, self.lockedhashes = data[:3] |
| 142 | super().set_taskdata(data[3:]) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 143 | |
| 144 | def dump_sigs(self, dataCache, options): |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 145 | sigfile = os.getcwd() + "/locked-sigs.inc" |
| 146 | bb.plain("Writing locked sigs to %s" % sigfile) |
| 147 | self.dump_lockedsigs(sigfile) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 148 | return super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigs(dataCache, options) |
| 149 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 150 | def prep_taskhash(self, tid, deps, dataCaches): |
| 151 | super().prep_taskhash(tid, deps, dataCaches) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 152 | if hasattr(self, "extramethod"): |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 153 | (mc, _, _, fn) = bb.runqueue.split_tid_mcfn(tid) |
| 154 | inherits = " ".join(dataCaches[mc].inherits[fn]) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 155 | if inherits.find("/native.bbclass") != -1 or inherits.find("/cross.bbclass") != -1: |
| 156 | self.extramethod[tid] = ":" + self.buildarch |
| 157 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 158 | def get_taskhash(self, tid, deps, dataCaches): |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 159 | if tid in self.lockedhashes: |
| 160 | if self.lockedhashes[tid]: |
| 161 | return self.lockedhashes[tid] |
| 162 | else: |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 163 | return super().get_taskhash(tid, deps, dataCaches) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 164 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 165 | # get_taskhash will call get_unihash internally in the parent class, we |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 166 | # need to disable our filter of it whilst this runs else |
| 167 | # incorrect hashes can be calculated. |
| 168 | self._internal = True |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 169 | h = super().get_taskhash(tid, deps, dataCaches) |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 170 | self._internal = False |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 171 | |
| 172 | (mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 173 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 174 | recipename = dataCaches[mc].pkg_fn[fn] |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 175 | self.lockedpnmap[fn] = recipename |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 176 | self.lockedhashfn[fn] = dataCaches[mc].hashfn[fn] |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 177 | |
| 178 | unlocked = False |
| 179 | if recipename in self.unlockedrecipes: |
| 180 | unlocked = True |
| 181 | else: |
| 182 | def recipename_from_dep(dep): |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 183 | (depmc, _, _, depfn) = bb.runqueue.split_tid_mcfn(dep) |
| 184 | return dataCaches[depmc].pkg_fn[depfn] |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 185 | |
| 186 | # If any unlocked recipe is in the direct dependencies then the |
| 187 | # current recipe should be unlocked as well. |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 188 | depnames = [ recipename_from_dep(x) for x in deps if mc == bb.runqueue.mc_from_tid(x)] |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 189 | if any(x in y for y in depnames for x in self.unlockedrecipes): |
| 190 | self.unlockedrecipes[recipename] = '' |
| 191 | unlocked = True |
| 192 | |
| 193 | if not unlocked and recipename in self.lockedsigs: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 194 | if task in self.lockedsigs[recipename]: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 195 | h_locked = self.lockedsigs[recipename][task][0] |
| 196 | var = self.lockedsigs[recipename][task][1] |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 197 | self.lockedhashes[tid] = h_locked |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 198 | self._internal = True |
| 199 | unihash = self.get_unihash(tid) |
| 200 | self._internal = False |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 201 | #bb.warn("Using %s %s %s" % (recipename, task, h)) |
| 202 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 203 | if h != h_locked and h_locked != unihash: |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 204 | self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s' |
| 205 | % (recipename, task, h, h_locked, var)) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 206 | |
| 207 | return h_locked |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 208 | |
| 209 | self.lockedhashes[tid] = False |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 210 | #bb.warn("%s %s %s" % (recipename, task, h)) |
| 211 | return h |
| 212 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 213 | def get_stampfile_hash(self, tid): |
| 214 | if tid in self.lockedhashes and self.lockedhashes[tid]: |
| 215 | return self.lockedhashes[tid] |
| 216 | return super().get_stampfile_hash(tid) |
| 217 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 218 | def get_unihash(self, tid): |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 219 | if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal: |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 220 | return self.lockedhashes[tid] |
| 221 | return super().get_unihash(tid) |
| 222 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 223 | def dump_sigtask(self, fn, task, stampbase, runtime): |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 224 | tid = fn + ":" + task |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 225 | if tid in self.lockedhashes and self.lockedhashes[tid]: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 226 | return |
| 227 | super(bb.siggen.SignatureGeneratorBasicHash, self).dump_sigtask(fn, task, stampbase, runtime) |
| 228 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 229 | def dump_lockedsigs(self, sigfile, taskfilter=None): |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 230 | types = {} |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 231 | for tid in self.runtaskdeps: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 232 | if taskfilter: |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 233 | if not tid in taskfilter: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 234 | continue |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 235 | fn = bb.runqueue.fn_from_tid(tid) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 236 | t = self.lockedhashfn[fn].split(" ")[1].split(":")[5] |
| 237 | t = 't-' + t.replace('_', '-') |
| 238 | if t not in types: |
| 239 | types[t] = [] |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 240 | types[t].append(tid) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 241 | |
| 242 | with open(sigfile, "w") as f: |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 243 | l = sorted(types) |
| 244 | for t in l: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 245 | f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % t) |
| 246 | types[t].sort() |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 247 | sortedtid = sorted(types[t], key=lambda tid: self.lockedpnmap[bb.runqueue.fn_from_tid(tid)]) |
| 248 | for tid in sortedtid: |
| 249 | (_, _, task, fn) = bb.runqueue.split_tid_mcfn(tid) |
| 250 | if tid not in self.taskhash: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 251 | continue |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 252 | f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 253 | f.write(' "\n') |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 254 | f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l))) |
| 255 | |
| 256 | def dump_siglist(self, sigfile): |
| 257 | with open(sigfile, "w") as f: |
| 258 | tasks = [] |
| 259 | for taskitem in self.taskhash: |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 260 | (fn, task) = taskitem.rsplit(":", 1) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 261 | pn = self.lockedpnmap[fn] |
| 262 | tasks.append((pn, task, fn, self.taskhash[taskitem])) |
| 263 | for (pn, task, fn, taskhash) in sorted(tasks): |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 264 | f.write('%s:%s %s %s\n' % (pn, task, fn, taskhash)) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 265 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 266 | def checkhashes(self, sq_data, missed, found, d): |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 267 | warn_msgs = [] |
| 268 | error_msgs = [] |
| 269 | sstate_missing_msgs = [] |
| 270 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 271 | for tid in sq_data['hash']: |
| 272 | if tid not in found: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 273 | for pn in self.lockedsigs: |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 274 | taskname = bb.runqueue.taskname_from_tid(tid) |
| 275 | if sq_data['hash'][tid] in iter(self.lockedsigs[pn].values()): |
| 276 | if taskname == 'do_shared_workdir': |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 277 | continue |
| 278 | sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 279 | % (pn, taskname, sq_data['hash'][tid])) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 280 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 281 | checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK") |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 282 | if checklevel == 'warn': |
| 283 | warn_msgs += self.mismatch_msgs |
| 284 | elif checklevel == 'error': |
| 285 | error_msgs += self.mismatch_msgs |
| 286 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 287 | checklevel = d.getVar("SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK") |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 288 | if checklevel == 'warn': |
| 289 | warn_msgs += sstate_missing_msgs |
| 290 | elif checklevel == 'error': |
| 291 | error_msgs += sstate_missing_msgs |
| 292 | |
| 293 | if warn_msgs: |
| 294 | bb.warn("\n".join(warn_msgs)) |
| 295 | if error_msgs: |
| 296 | bb.fatal("\n".join(error_msgs)) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 297 | |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 298 | class SignatureGeneratorOEBasicHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorBasicHash): |
| 299 | name = "OEBasicHash" |
| 300 | |
| 301 | class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorUniHashMixIn, bb.siggen.SignatureGeneratorBasicHash): |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 302 | name = "OEEquivHash" |
| 303 | |
| 304 | def init_rundepcheck(self, data): |
| 305 | super().init_rundepcheck(data) |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 306 | self.server = data.getVar('BB_HASHSERVE') |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 307 | if not self.server: |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 308 | bb.fatal("OEEquivHash requires BB_HASHSERVE to be set") |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 309 | self.method = data.getVar('SSTATE_HASHEQUIV_METHOD') |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 310 | if not self.method: |
| 311 | bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set") |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 312 | |
| 313 | # Insert these classes into siggen's namespace so it can see and select them |
| 314 | bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic |
| 315 | bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 316 | bb.siggen.SignatureGeneratorOEEquivHash = SignatureGeneratorOEEquivHash |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 317 | |
| 318 | |
| 319 | def find_siginfo(pn, taskname, taskhashlist, d): |
| 320 | """ Find signature data files for comparison purposes """ |
| 321 | |
| 322 | import fnmatch |
| 323 | import glob |
| 324 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 325 | if not taskname: |
| 326 | # We have to derive pn and taskname |
| 327 | key = pn |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 328 | splitit = key.split('.bb:') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 329 | taskname = splitit[1] |
| 330 | pn = os.path.basename(splitit[0]).split('_')[0] |
| 331 | if key.startswith('virtual:native:'): |
| 332 | pn = pn + '-native' |
| 333 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 334 | hashfiles = {} |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 335 | filedates = {} |
| 336 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 337 | def get_hashval(siginfo): |
| 338 | if siginfo.endswith('.siginfo'): |
| 339 | return siginfo.rpartition(':')[2].partition('_')[0] |
| 340 | else: |
| 341 | return siginfo.rpartition('.')[2] |
| 342 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 343 | # First search in stamps dir |
| 344 | localdata = d.createCopy() |
| 345 | localdata.setVar('MULTIMACH_TARGET_SYS', '*') |
| 346 | localdata.setVar('PN', pn) |
| 347 | localdata.setVar('PV', '*') |
| 348 | localdata.setVar('PR', '*') |
| 349 | localdata.setVar('EXTENDPE', '') |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 350 | stamp = localdata.getVar('STAMP') |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 351 | if pn.startswith("gcc-source"): |
| 352 | # gcc-source shared workdir is a special case :( |
| 353 | stamp = localdata.expand("${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}") |
| 354 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 355 | filespec = '%s.%s.sigdata.*' % (stamp, taskname) |
| 356 | foundall = False |
| 357 | import glob |
| 358 | for fullpath in glob.glob(filespec): |
| 359 | match = False |
| 360 | if taskhashlist: |
| 361 | for taskhash in taskhashlist: |
| 362 | if fullpath.endswith('.%s' % taskhash): |
| 363 | hashfiles[taskhash] = fullpath |
| 364 | if len(hashfiles) == len(taskhashlist): |
| 365 | foundall = True |
| 366 | break |
| 367 | else: |
| 368 | try: |
| 369 | filedates[fullpath] = os.stat(fullpath).st_mtime |
| 370 | except OSError: |
| 371 | continue |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 372 | hashval = get_hashval(fullpath) |
| 373 | hashfiles[hashval] = fullpath |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 374 | |
| 375 | if not taskhashlist or (len(filedates) < 2 and not foundall): |
| 376 | # That didn't work, look in sstate-cache |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 377 | hashes = taskhashlist or ['?' * 64] |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 378 | localdata = bb.data.createCopy(d) |
| 379 | for hashval in hashes: |
| 380 | localdata.setVar('PACKAGE_ARCH', '*') |
| 381 | localdata.setVar('TARGET_VENDOR', '*') |
| 382 | localdata.setVar('TARGET_OS', '*') |
| 383 | localdata.setVar('PN', pn) |
| 384 | localdata.setVar('PV', '*') |
| 385 | localdata.setVar('PR', '*') |
| 386 | localdata.setVar('BB_TASKHASH', hashval) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 387 | swspec = localdata.getVar('SSTATE_SWSPEC') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 388 | if taskname in ['do_fetch', 'do_unpack', 'do_patch', 'do_populate_lic', 'do_preconfigure'] and swspec: |
| 389 | localdata.setVar('SSTATE_PKGSPEC', '${SSTATE_SWSPEC}') |
| 390 | elif pn.endswith('-native') or "-cross-" in pn or "-crosssdk-" in pn: |
| 391 | localdata.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/") |
| 392 | sstatename = taskname[3:] |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 393 | filespec = '%s_%s.*.siginfo' % (localdata.getVar('SSTATE_PKG'), sstatename) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 394 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 395 | matchedfiles = glob.glob(filespec) |
| 396 | for fullpath in matchedfiles: |
| 397 | actual_hashval = get_hashval(fullpath) |
| 398 | if actual_hashval in hashfiles: |
| 399 | continue |
| 400 | hashfiles[hashval] = fullpath |
| 401 | if not taskhashlist: |
| 402 | try: |
| 403 | filedates[fullpath] = os.stat(fullpath).st_mtime |
| 404 | except: |
| 405 | continue |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 406 | |
| 407 | if taskhashlist: |
| 408 | return hashfiles |
| 409 | else: |
| 410 | return filedates |
| 411 | |
| 412 | bb.siggen.find_siginfo = find_siginfo |
| 413 | |
| 414 | |
| 415 | def sstate_get_manifest_filename(task, d): |
| 416 | """ |
| 417 | Return the sstate manifest file path for a particular task. |
| 418 | Also returns the datastore that can be used to query related variables. |
| 419 | """ |
| 420 | d2 = d.createCopy() |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 421 | extrainf = d.getVarFlag("do_" + task, 'stamp-extra-info') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 422 | if extrainf: |
| 423 | d2.setVar("SSTATE_MANMACH", extrainf) |
| 424 | return (d2.expand("${SSTATE_MANFILEPREFIX}.%s" % task), d2) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 425 | |
| 426 | def find_sstate_manifest(taskdata, taskdata2, taskname, d, multilibcache): |
| 427 | d2 = d |
| 428 | variant = '' |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 429 | curr_variant = '' |
| 430 | if d.getVar("BBEXTENDCURR") == "multilib": |
| 431 | curr_variant = d.getVar("BBEXTENDVARIANT") |
| 432 | if "virtclass-multilib" not in d.getVar("OVERRIDES"): |
| 433 | curr_variant = "invalid" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 434 | if taskdata2.startswith("virtual:multilib"): |
| 435 | variant = taskdata2.split(":")[2] |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 436 | if curr_variant != variant: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 437 | if variant not in multilibcache: |
| 438 | multilibcache[variant] = oe.utils.get_multilib_datastore(variant, d) |
| 439 | d2 = multilibcache[variant] |
| 440 | |
| 441 | if taskdata.endswith("-native"): |
| 442 | pkgarchs = ["${BUILD_ARCH}"] |
| 443 | elif taskdata.startswith("nativesdk-"): |
| 444 | pkgarchs = ["${SDK_ARCH}_${SDK_OS}", "allarch"] |
| 445 | elif "-cross-canadian" in taskdata: |
| 446 | pkgarchs = ["${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}"] |
| 447 | elif "-cross-" in taskdata: |
| 448 | pkgarchs = ["${BUILD_ARCH}_${TARGET_ARCH}"] |
| 449 | elif "-crosssdk" in taskdata: |
| 450 | pkgarchs = ["${BUILD_ARCH}_${SDK_ARCH}_${SDK_OS}"] |
| 451 | else: |
| 452 | pkgarchs = ['${MACHINE_ARCH}'] |
| 453 | pkgarchs = pkgarchs + list(reversed(d2.getVar("PACKAGE_EXTRA_ARCHS").split())) |
| 454 | pkgarchs.append('allarch') |
| 455 | pkgarchs.append('${SDK_ARCH}_${SDK_ARCH}-${SDKPKGSUFFIX}') |
| 456 | |
| 457 | for pkgarch in pkgarchs: |
| 458 | manifest = d2.expand("${SSTATE_MANIFESTS}/manifest-%s-%s.%s" % (pkgarch, taskdata, taskname)) |
| 459 | if os.path.exists(manifest): |
| 460 | return manifest, d2 |
| 461 | bb.warn("Manifest %s not found in %s (variant '%s')?" % (manifest, d2.expand(" ".join(pkgarchs)), variant)) |
| 462 | return None, d2 |
| 463 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 464 | def OEOuthashBasic(path, sigfile, task, d): |
| 465 | """ |
| 466 | Basic output hash function |
| 467 | |
| 468 | Calculates the output hash of a task by hashing all output file metadata, |
| 469 | and file contents. |
| 470 | """ |
| 471 | import hashlib |
| 472 | import stat |
| 473 | import pwd |
| 474 | import grp |
| 475 | |
| 476 | def update_hash(s): |
| 477 | s = s.encode('utf-8') |
| 478 | h.update(s) |
| 479 | if sigfile: |
| 480 | sigfile.write(s) |
| 481 | |
| 482 | h = hashlib.sha256() |
| 483 | prev_dir = os.getcwd() |
| 484 | include_owners = os.environ.get('PSEUDO_DISABLED') == '0' |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 485 | extra_content = d.getVar('HASHEQUIV_HASH_VERSION') |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 486 | |
| 487 | try: |
| 488 | os.chdir(path) |
| 489 | |
| 490 | update_hash("OEOuthashBasic\n") |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 491 | if extra_content: |
| 492 | update_hash(extra_content + "\n") |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 493 | |
| 494 | # It is only currently useful to get equivalent hashes for things that |
| 495 | # can be restored from sstate. Since the sstate object is named using |
| 496 | # SSTATE_PKGSPEC and the task name, those should be included in the |
| 497 | # output hash calculation. |
| 498 | update_hash("SSTATE_PKGSPEC=%s\n" % d.getVar('SSTATE_PKGSPEC')) |
| 499 | update_hash("task=%s\n" % task) |
| 500 | |
| 501 | for root, dirs, files in os.walk('.', topdown=True): |
| 502 | # Sort directories to ensure consistent ordering when recursing |
| 503 | dirs.sort() |
| 504 | files.sort() |
| 505 | |
| 506 | def process(path): |
| 507 | s = os.lstat(path) |
| 508 | |
| 509 | if stat.S_ISDIR(s.st_mode): |
| 510 | update_hash('d') |
| 511 | elif stat.S_ISCHR(s.st_mode): |
| 512 | update_hash('c') |
| 513 | elif stat.S_ISBLK(s.st_mode): |
| 514 | update_hash('b') |
| 515 | elif stat.S_ISSOCK(s.st_mode): |
| 516 | update_hash('s') |
| 517 | elif stat.S_ISLNK(s.st_mode): |
| 518 | update_hash('l') |
| 519 | elif stat.S_ISFIFO(s.st_mode): |
| 520 | update_hash('p') |
| 521 | else: |
| 522 | update_hash('-') |
| 523 | |
| 524 | def add_perm(mask, on, off='-'): |
| 525 | if mask & s.st_mode: |
| 526 | update_hash(on) |
| 527 | else: |
| 528 | update_hash(off) |
| 529 | |
| 530 | add_perm(stat.S_IRUSR, 'r') |
| 531 | add_perm(stat.S_IWUSR, 'w') |
| 532 | if stat.S_ISUID & s.st_mode: |
| 533 | add_perm(stat.S_IXUSR, 's', 'S') |
| 534 | else: |
| 535 | add_perm(stat.S_IXUSR, 'x') |
| 536 | |
| 537 | add_perm(stat.S_IRGRP, 'r') |
| 538 | add_perm(stat.S_IWGRP, 'w') |
| 539 | if stat.S_ISGID & s.st_mode: |
| 540 | add_perm(stat.S_IXGRP, 's', 'S') |
| 541 | else: |
| 542 | add_perm(stat.S_IXGRP, 'x') |
| 543 | |
| 544 | add_perm(stat.S_IROTH, 'r') |
| 545 | add_perm(stat.S_IWOTH, 'w') |
| 546 | if stat.S_ISVTX & s.st_mode: |
| 547 | update_hash('t') |
| 548 | else: |
| 549 | add_perm(stat.S_IXOTH, 'x') |
| 550 | |
| 551 | if include_owners: |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 552 | try: |
| 553 | update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name) |
| 554 | update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name) |
| 555 | except KeyError: |
| 556 | bb.warn("KeyError in %s" % path) |
| 557 | raise |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 558 | |
| 559 | update_hash(" ") |
| 560 | if stat.S_ISBLK(s.st_mode) or stat.S_ISCHR(s.st_mode): |
| 561 | update_hash("%9s" % ("%d.%d" % (os.major(s.st_rdev), os.minor(s.st_rdev)))) |
| 562 | else: |
| 563 | update_hash(" " * 9) |
| 564 | |
| 565 | update_hash(" ") |
| 566 | if stat.S_ISREG(s.st_mode): |
| 567 | update_hash("%10d" % s.st_size) |
| 568 | else: |
| 569 | update_hash(" " * 10) |
| 570 | |
| 571 | update_hash(" ") |
| 572 | fh = hashlib.sha256() |
| 573 | if stat.S_ISREG(s.st_mode): |
| 574 | # Hash file contents |
| 575 | with open(path, 'rb') as d: |
| 576 | for chunk in iter(lambda: d.read(4096), b""): |
| 577 | fh.update(chunk) |
| 578 | update_hash(fh.hexdigest()) |
| 579 | else: |
| 580 | update_hash(" " * len(fh.hexdigest())) |
| 581 | |
| 582 | update_hash(" %s" % path) |
| 583 | |
| 584 | if stat.S_ISLNK(s.st_mode): |
| 585 | update_hash(" -> %s" % os.readlink(path)) |
| 586 | |
| 587 | update_hash("\n") |
| 588 | |
| 589 | # Process this directory and all its child files |
| 590 | process(root) |
| 591 | for f in files: |
| 592 | if f == 'fixmepath': |
| 593 | continue |
| 594 | process(os.path.join(root, f)) |
| 595 | finally: |
| 596 | os.chdir(prev_dir) |
| 597 | |
| 598 | return h.hexdigest() |
| 599 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 600 | |