mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-21 14:47:18 +00:00
Use check function instead of from_url
The check function in pkg_integrity will look for a signature (or sha256 if a gem) inside the folder where a package is processed
This commit is contained in:
@@ -225,7 +225,7 @@ def main():
|
||||
print("\n")
|
||||
|
||||
if args.integrity == True:
|
||||
pkg_integrity.from_url(args.url, build.download_path)
|
||||
pkg_integrity.check(args.url, build.download_path)
|
||||
|
||||
while 1:
|
||||
build.package()
|
||||
|
||||
@@ -146,7 +146,7 @@ class GPGVerifier(Verifier):
|
||||
return True
|
||||
else:
|
||||
msg = "Unable to download file {} http code {}"
|
||||
print_error(msg.format(self.key_url, code))
|
||||
self.print_result(False, msg.format(self.key_url, code))
|
||||
|
||||
def verify(self):
|
||||
print("Verifying GPG signature\n")
|
||||
@@ -206,6 +206,9 @@ class GEMShaVerifier(Verifier):
|
||||
def verify(self):
|
||||
gemname = os.path.basename(self.package_path).replace('.gem', '')
|
||||
print("Verifying SHA256 checksum\n")
|
||||
if os.path.exists(self.package_path) is False:
|
||||
self.print_result(False, 'GEM was not found {}'.format(self.package_path))
|
||||
return
|
||||
name, _ = re.split('-\d+\.', gemname)
|
||||
number = gemname.replace(name + '-', '')
|
||||
geminfo = self.get_rubygems_info(name)
|
||||
|
||||
Reference in New Issue
Block a user