cpoerschke commented on a change in pull request #355:
URL: https://github.com/apache/lucene/pull/355#discussion_r727204711



##########
File path: dev-tools/scripts/smokeTestRelease.py
##########
@@ -141,21 +146,19 @@ def checkJARMetaData(desc, jarFile, gitRevision, version):
           raise RuntimeError('%s is missing %s' % (desc, name))
       except KeyError:
         raise RuntimeError('%s is missing %s' % (desc, name))
-      
+
     s = decodeUTF8(z.read(MANIFEST_FILE_NAME))
-    
+
     for verify in (
       'Specification-Vendor: The Apache Software Foundation',
       'Implementation-Vendor: The Apache Software Foundation',
-      # Make sure 1.8 compiler was used to build release bits:
+      'Specification-Title: Lucene Search Engine:',
+      'Implementation-Title: org.apache.lucene',
       'X-Compile-Source-JDK: 11',
-      # Make sure 1.8, 1.9 or 1.10 ant was used to build release bits: (this 
will match 1.8.x, 1.9.x, 1.10.x)
-      ('Ant-Version: Apache Ant 1.8', 'Ant-Version: Apache Ant 1.9', 
'Ant-Version: Apache Ant 1.10'),
-      # Make sure .class files are 1.8 format:

Review comment:
       `git grep -i ant` also finds some other ant reference e.g. line 70. 
could those be removed too maybe then?

##########
File path: dev-tools/scripts/smokeTestRelease.py
##########
@@ -1043,122 +823,81 @@ def getPOMcoordinate(treeRoot):
   packaging = 'jar' if packaging is None else packaging.text.strip()
   return groupId, artifactId, packaging, version
 
-def verifyMavenSigs(baseURL, tmpDir, artifacts, keysFile):
-  print('    verify maven artifact sigs', end=' ')
-  for project in ('lucene', 'solr'):
-
-    # Set up clean gpg world; import keys file:
-    gpgHomeDir = '%s/%s.gpg' % (tmpDir, project)
-    if os.path.exists(gpgHomeDir):
-      shutil.rmtree(gpgHomeDir)
-    os.makedirs(gpgHomeDir, 0o700)
-    run('gpg --homedir %s --import %s' % (gpgHomeDir, keysFile),
-        '%s/%s.gpg.import.log' % (tmpDir, project))
-
-    reArtifacts = re.compile(r'\.(?:pom|[jw]ar)$')
-    for artifactFile in [a for a in artifacts[project] if 
reArtifacts.search(a)]:
-      artifact = os.path.basename(artifactFile)
-      sigFile = '%s.asc' % artifactFile
-      # Test sig (this is done with a clean brand-new GPG world)
-      logFile = '%s/%s.%s.gpg.verify.log' % (tmpDir, project, artifact)
-      run('gpg --homedir %s --verify %s %s' % (gpgHomeDir, sigFile, 
artifactFile),
-          logFile)
-      # Forward any GPG warnings, except the expected one (since it's a clean 
world)
-      f = open(logFile)
-      for line in f.readlines():
-        if line.lower().find('warning') != -1 \
-           and line.find('WARNING: This key is not certified with a trusted 
signature') == -1 \
-           and line.find('WARNING: using insecure memory') == -1:
-          print('      GPG: %s' % line.strip())
-      f.close()
 
-      # Test trust (this is done with the real users config)
-      run('gpg --import %s' % keysFile,
-          '%s/%s.gpg.trust.import.log' % (tmpDir, project))
-      logFile = '%s/%s.%s.gpg.trust.log' % (tmpDir, project, artifact)
-      run('gpg --verify %s %s' % (sigFile, artifactFile), logFile)
-      # Forward any GPG warnings:
-      f = open(logFile)
-      for line in f.readlines():
-        if line.lower().find('warning') != -1 \
-           and line.find('WARNING: This key is not certified with a trusted 
signature') == -1 \
-           and line.find('WARNING: using insecure memory') == -1:
-          print('      GPG: %s' % line.strip())
-      f.close()
+def verifyMavenSigs(tmpDir, artifacts, keysFile):
+  print('    verify maven artifact sigs', end=' ')
 
-      sys.stdout.write('.')
+  # Set up clean gpg world; import keys file:
+  gpgHomeDir = '%s/lucene.gpg' % tmpDir
+  if os.path.exists(gpgHomeDir):
+    shutil.rmtree(gpgHomeDir)
+  os.makedirs(gpgHomeDir, 0o700)
+  run('gpg --homedir %s --import %s' % (gpgHomeDir, keysFile),
+      '%s/lucene.gpg.import.log' % tmpDir)
+
+  reArtifacts = re.compile(r'\.(?:pom|[jw]ar)$')
+  for artifactFile in [a for a in artifacts if reArtifacts.search(a)]:
+    artifact = os.path.basename(artifactFile)
+    sigFile = '%s.asc' % artifactFile
+    # Test sig (this is done with a clean brand-new GPG world)
+    logFile = '%s/lucene.%s.gpg.verify.log' % (tmpDir, artifact)
+    run('gpg --homedir %s --verify %s %s' % (gpgHomeDir, sigFile, 
artifactFile),
+        logFile)
+
+    # Forward any GPG warnings, except the expected one (since it's a clean 
world)
+    print_warnings_in_file(logFile)
+
+    # Test trust (this is done with the real users config)
+    run('gpg --import %s' % keysFile,
+        '%s/lucene.gpg.trust.import.log' % tmpDir)
+    logFile = '%s/lucene.%s.gpg.trust.log' % (tmpDir, artifact)
+    run('gpg --verify %s %s' % (sigFile, artifactFile), logFile)
+    # Forward any GPG warnings:
+    print_warnings_in_file(logFile)
+
+    sys.stdout.write('.')
   print()
 
+
+def print_warnings_in_file(file):
+  f = open(file)

Review comment:
       Thanks for factoring out a method here to remove the previous code 
duplication!
   
   minor: `with open(file) as f:` could be a way to not need the explicit 
`f.close()` at the end.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to