mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Fix gitian-build.py --verify option
The gitian-builder/bin/gverify script returns the exit code 1 if a signature verification ends with 'BAD SIGNATURE' or 'MISMATCH' by design. This commit allows to see the verification results for all signatures without a premature fail of the gitian-build.py script.
This commit is contained in:
parent
4c56a798c0
commit
0f22a0cf2f
1 changed files with 22 additions and 6 deletions
|
@ -118,20 +118,36 @@ def sign():
|
||||||
|
|
||||||
def verify():
|
def verify():
|
||||||
global args, workdir
|
global args, workdir
|
||||||
|
rc = 0
|
||||||
os.chdir('gitian-builder')
|
os.chdir('gitian-builder')
|
||||||
|
|
||||||
print('\nVerifying v'+args.version+' Linux\n')
|
print('\nVerifying v'+args.version+' Linux\n')
|
||||||
subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-linux', '../bitcoin/contrib/gitian-descriptors/gitian-linux.yml'])
|
if subprocess.call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-linux', '../bitcoin/contrib/gitian-descriptors/gitian-linux.yml']):
|
||||||
|
print('Verifying v'+args.version+' Linux FAILED\n')
|
||||||
|
rc = 1
|
||||||
|
|
||||||
print('\nVerifying v'+args.version+' Windows\n')
|
print('\nVerifying v'+args.version+' Windows\n')
|
||||||
subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-win-unsigned', '../bitcoin/contrib/gitian-descriptors/gitian-win.yml'])
|
if subprocess.call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-win-unsigned', '../bitcoin/contrib/gitian-descriptors/gitian-win.yml']):
|
||||||
|
print('Verifying v'+args.version+' Windows FAILED\n')
|
||||||
|
rc = 1
|
||||||
|
|
||||||
print('\nVerifying v'+args.version+' MacOS\n')
|
print('\nVerifying v'+args.version+' MacOS\n')
|
||||||
subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-osx-unsigned', '../bitcoin/contrib/gitian-descriptors/gitian-osx.yml'])
|
if subprocess.call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-osx-unsigned', '../bitcoin/contrib/gitian-descriptors/gitian-osx.yml']):
|
||||||
|
print('Verifying v'+args.version+' MacOS FAILED\n')
|
||||||
|
rc = 1
|
||||||
|
|
||||||
print('\nVerifying v'+args.version+' Signed Windows\n')
|
print('\nVerifying v'+args.version+' Signed Windows\n')
|
||||||
subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-win-signed', '../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml'])
|
if subprocess.call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-win-signed', '../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml']):
|
||||||
|
print('Verifying v'+args.version+' Signed Windows FAILED\n')
|
||||||
|
rc = 1
|
||||||
|
|
||||||
print('\nVerifying v'+args.version+' Signed MacOS\n')
|
print('\nVerifying v'+args.version+' Signed MacOS\n')
|
||||||
subprocess.check_call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-osx-signed', '../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml'])
|
if subprocess.call(['bin/gverify', '-v', '-d', '../gitian.sigs/', '-r', args.version+'-osx-signed', '../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml']):
|
||||||
|
print('Verifying v'+args.version+' Signed MacOS FAILED\n')
|
||||||
|
rc = 1
|
||||||
|
|
||||||
os.chdir(workdir)
|
os.chdir(workdir)
|
||||||
|
return rc
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global args, workdir
|
global args, workdir
|
||||||
|
@ -237,7 +253,7 @@ def main():
|
||||||
os.chdir('gitian.sigs')
|
os.chdir('gitian.sigs')
|
||||||
subprocess.check_call(['git', 'pull'])
|
subprocess.check_call(['git', 'pull'])
|
||||||
os.chdir(workdir)
|
os.chdir(workdir)
|
||||||
verify()
|
sys.exit(verify())
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Reference in a new issue