[asterisk-commits] mkrelease: Create .asc files even if no signing will occur (repotools[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 9 18:01:21 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: mkrelease: Create .asc files even if no signing will occur
......................................................................


mkrelease: Create .asc files even if no signing will occur

If the local system does not have a PGP key installed on it, the .asc
files will fail to be created as no writing will occur. This patch adds
a 'touch' just before writing out the signed archive, which will always
cause the .asc files to be created. It also corrects the name of the
signed archive files, which previously failed to append the full suffix of
the archive file being signed.

Change-Id: I588901ba4f5f3c3fb25e35b9ef58c371dee7b748
---
M mkrelease.py
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/mkrelease.py b/mkrelease.py
index ab1706c..61415ac 100755
--- a/mkrelease.py
+++ b/mkrelease.py
@@ -413,6 +413,7 @@
     file_name   - The file that we should sign.
     out_file    - The .asc file we should write to.
     """
+    os.system('touch {0}'.format(out_file))
     with open(file_name, 'r') as file_stream:
         gpg = gnupg.GPG()
         gpg.sign_file(file_stream, detach=True, output=out_file)
@@ -452,7 +453,7 @@
     out_file = '{0}.tar.gz'.format(diff_file)
     with tarfile.open(name=out_file, mode='w:gz') as tar_obj:
         tar_obj.add(file_name)
-    sign_archive(out_file, '{0}.asc'.format(diff_file))
+    sign_archive(out_file, '{0}.tar.gz.asc'.format(diff_file))
 
     dprint("Created diff file '{0}'".format(out_file))
     create_hashes(out_file, mod='patch')
@@ -533,7 +534,7 @@
         dprint("Creating final archive '{0}'".format(name))
         with tarfile.open(name=name, mode='w:gz') as tar_obj:
             tar_obj.add(path)
-        sign_archive(name, '{0}.asc'.format(release_name))
+        sign_archive(name, '{0}.tar.gz.asc'.format(release_name))
 
         return name
 

-- 
To view, visit https://gerrit.asterisk.org/611
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I588901ba4f5f3c3fb25e35b9ef58c371dee7b748
Gerrit-PatchSet: 1
Gerrit-Project: repotools
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list