Skip to content

Commit

Permalink
Builder: Make signatures for all distributed packages
Browse files Browse the repository at this point in the history
GnuPG is used for creating package signatures. The existing repository
signing key is used (skyjake's key). The signatures are available with
a .gpg extension along with the packages.
  • Loading branch information
skyjake committed Jun 7, 2012
1 parent 902a40b commit 02c4542
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions distrib/autobuild.py
Expand Up @@ -92,6 +92,16 @@ def todays_platform_release():
git_checkout(builder.config.BRANCH)


def sign_packages():
"""Sign all packages in today's build."""
ev = builder.Event()
print "Signing today's build %i." % ev.number()
for fn in os.listdir(ev.path()):
if fn.endswith('.exe') or fn.endswith('.dmg') or fn.endswith('.deb'):
# Make a signature for this.
os.system("gpg --output %s -ba %s" % (fn + '.gpg', fn))


def find_previous_tag(toTag, version):
builds = builder.events_by_time()
#print [(e[1].number(), e[1].timestamp()) for e in builds]
Expand Down Expand Up @@ -417,6 +427,7 @@ def sorted_commands():
'pull': pull_from_branch,
'create': create_build_event,
'platform_release': todays_platform_release,
'sign': sign_packages,
'changes': update_changes,
'debchanges': update_debian_changelog,
'apt': rebuild_apt_repository,
Expand Down
1 change: 1 addition & 0 deletions distrib/builder/event.py
Expand Up @@ -109,6 +109,7 @@ def name(self):
return self.name

def number(self):
"""Returns the event's build number as an integer."""
return self.num

def path(self):
Expand Down
7 changes: 7 additions & 0 deletions distrib/pilot.py
Expand Up @@ -325,6 +325,10 @@ def doTask(task):
msg("BUILD RELEASE")
return autobuild('platform_release')

elif task == 'sign':
msg("SIGN PACKAGES")
return autobuild('sign')

elif task == 'publish':
msg("PUBLISH")
systemCommand('deng_copy_build_to_sourceforge.sh')
Expand Down Expand Up @@ -387,6 +391,9 @@ def handleCompletedTasks():
newTask('build', allClients=True)

elif task == 'build':
newTask('sign', forClient='master')

elif task == 'sign':
newTask('publish', forClient='master')
newTask('apt_refresh', forClient='ubuntu')
# After the build we can switch to the master again.
Expand Down

0 comments on commit 02c4542

Please sign in to comment.