MCPcopy Create free account
hub / github.com/apache/solr / checkSigs

Function checkSigs

dev-tools/scripts/smokeTestRelease.py:220–354  ·  view source on GitHub ↗
(urlString, version, tmpDir, isSigned, keysFile)

Source from the content-addressed store, hash-verified

218
219def checkAllJARs(topDir, gitRevision, version):
220 print(' verify JAR metadata/identity/no javax.* or java.* classes...')
221 for root, dirs, files in os.walk(topDir): # pylint: disable=unused-variable
222
223 normRoot = normSlashes(root)
224
225 if normRoot.endswith('/server/lib'):
226 # Solr's example intentionally ships servlet JAR:
227 continue
228
229 for file in files:
230 if file.lower().endswith('.jar'):
231 fullPath = '%s/%s' % (root, file)
232 noJavaPackageClasses('JAR file "%s"' % fullPath, fullPath)
233 if file.lower().find('solr') != -1:
234 checkJARMetaData('JAR file "%s"' % fullPath, fullPath, gitRevision, version)
235
236
237def checkSigs(urlString, version, tmpDir, isSigned, keysFile):
238 print(' test basics...')
239 ents = getDirEntries(urlString)
240 artifact = None
241 changesURL = None
242 openApiURL = None
243 mavenURL = None
244 dockerURL = None
245 artifactURL = None
246 expectedSigs = []
247 if isSigned:
248 expectedSigs.append('asc')
249 expectedSigs.extend(['sha512'])
250 sigs = []
251 artifacts = []
252
253 for text, subURL in ents:
254 if text == '.gitrev':
255 continue # Allow this in the distribution build directory
256 if text == 'KEYS':
257 raise RuntimeError('solr: release dir should not contain a KEYS file - only toplevel /dist/solr/KEYS is used')
258 elif text == 'maven/':
259 mavenURL = subURL
260 elif text == 'docker/':
261 dockerURL = subURL
262 elif text.startswith('changes'):
263 if text not in ('changes/', 'changes-%s/' % version):
264 raise RuntimeError('solr: found %s vs expected changes-%s/' % (text, version))
265 changesURL = subURL
266 elif text.startswith('openApi'):
267 if text not in ('openApi/', 'openApi-%s/' % version):
268 raise RuntimeError('solr: found %s vs expected openApi-%s/' % (text, version))
269 openApiURL = subURL
270 elif artifact is None:
271 artifact = text
272 artifactURL = subURL
273 expected = 'solr-%s' % version
274 if not artifact.startswith(expected):
275 raise RuntimeError('solr: unknown artifact %s: expected prefix %s' % (text, expected))
276 sigs = []
277 elif text.startswith(artifact + '.'):

Callers 1

smokeTestFunction · 0.85

Calls 12

getDirEntriesFunction · 0.85
stopGpgAgentFunction · 0.85
testChangesFunction · 0.85
testOpenApiFunction · 0.85
verifyDigestsFunction · 0.85
stripMethod · 0.80
runFunction · 0.70
appendMethod · 0.65
sortMethod · 0.65
existsMethod · 0.65
downloadMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…